|
-
Aug 2nd, 1999, 05:59 PM
#1
Thread Starter
Lively Member
Hi, I am trying to get a loop to show the Client's name on the form I am loading but it skips the Clients name and leaves things blank. The user click on a user in a listview and then it goes to this form. Now the code I have for the form is:
Set qryDef = pDatabase.QueryDefs("QryResults")
Set mRstrans = qryDef.OpenRecordset(, dbOpenDynaset)
dd = Mid$(FrmMain.LsvDetails.SelectedItem.Key, 2)
'dd is the current selected user
Do Until mRstrans.EOF
If dd = mRstrans!RAccountID Then
LabM.Caption = mRstrans!Measurement
LabDate.Caption = mRstrans!RDate
LabWeight.Caption = mRstrans!WeightScale
LabName.Caption = mRstrans!GivenName & " " & mRstrans!Surname
mRstrans.MoveLast
Else
mRstrans.MoveNext
End If
Loop
mRstrans.Close
Now as I was saying it goes through the list but when I create a new client and go to this form it doesn't load it in the labels provided so the user can't see who he/she is editing. When it gets to the correct id in "dd" it just skips from the line "Do until mRstrans.EOF" down to "mRstrans.close". It is a strange problem. I have use movenext in the line that says "mRstrans.MoveLast" but it just stuffs up.
Any ideas would be much appreciated and thanks in advance.
Mike
[This message has been edited by Spawny (edited 08-03-1999).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|