Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to LookUp Records

Status
Not open for further replies.

Kevsim

Instructor
Apr 18, 2000
385
AU
When writing code in Access 97, I would use the code below, using the event "After Update" in my Combo Box and it worked very well.
I wrote the same code in Access 2000 and it creates an error.
What is the code for Access 2000 to do the same thing.
I would appreciate any help.

Sub Combo28_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[ID] = " & Me![Combo28]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
kevsim
 
dim rs as object
SET RS = ME.RECORDSET.CLONE
rs.findfirst "[field]" = & me.ID
me.bookmark = rs.bookmark
seems the same as u had, but must work in 2K

write in freehand so may be failures in it,
hope it helps
gerard
 
gerard1979, Thank you for the prompt reply. I had made 2 errors in the database, when I found and corrected them the existing code worked OK.
kevsim
 
The wizard-generated code always uses a generic object variable to hold a reference to the Recordset clone.

I've had errors using:

[tt] me.Recordsetclone[/tt]

that went away using (note period):

[tt] me.Recordset.Clone[/tt]

Go figure... Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top