Tim L
Registered User.
- Local time
- Today, 23:14
- Joined
- Sep 6, 2002
- Messages
- 414
Access 2k/XP
Having used the wizard to create a List or Combo Box which then causes the form to display the record selected I have this code in the On Update event:
Private Sub Combo19_Click()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[JobID] = " & Str(Nz(Me![Combo19], 1))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
The only problem is that the form does not move to the selected record. I have tried using both List and Combo box, to no avail.
I have used this technique in another database, but there is a difference between the two. In this database the form displays records that have been filtered. I presume that this may be causing the problem.
Can any one give me an idea on how I can get the List box to work correctly?
Tim
Having used the wizard to create a List or Combo Box which then causes the form to display the record selected I have this code in the On Update event:
Private Sub Combo19_Click()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[JobID] = " & Str(Nz(Me![Combo19], 1))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
The only problem is that the form does not move to the selected record. I have tried using both List and Combo box, to no avail.
I have used this technique in another database, but there is a difference between the two. In this database the form displays records that have been filtered. I presume that this may be causing the problem.
Can any one give me an idea on how I can get the List box to work correctly?
Tim