Lookup combo box from 97 not working on 2002

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have used the same VB code for a long time to provide my users with a lookup field that let's them change the current record on a form. Here is that code:

' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[ClientID] = " & Me![Lookup]
Me.Bookmark = Me.RecordsetClone.Bookmark

It's not working now that I've upgraded to Access 2002.
Help!
 
BarbaraH said:
I have used the same VB code for a long time to provide my users with
a lookup field that let's them change the current record on a form.
Here is that code:

' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[ClientID] = " & Me![Lookup]
Me.Bookmark = Me.RecordsetClone.Bookmark

It's not working now that I've upgraded to Access 2002.
Help!

Try

' Find the record that matches the control.
With Me.RecordsetClone
.FindFirst "[ClientID] = " & Me![Lookup]
Me.Bookmark = .Bookmark
End With
 
This works for me in Access 2000:

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ClientID] = " & Str(Nz(Me![cboClientID], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark



BarbaraH said:
I have used the same VB code for a long time to provide my users with a
lookup field that let's them change the current record on a form. Here is
that code:
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[ClientID] = " & Me![Lookup]
Me.Bookmark = Me.RecordsetClone.Bookmark

It's not working now that I've upgraded to Access 2002.
Help!
 
Back
Top