Open Form to Selected Record

Mel Henderson

Registered User.
Local time
Today, 20:02
Joined
Feb 13, 2000
Messages
14
I have a form named BO Parts, it gets info from a query named "Receive BO Parts". When I open the form it opens to a new record with the cursor blinking in a field named [Pick Tkt Number]this is a text field. What I'm trying to do is when I type in a Pick Tkt Number, if I allready have a record that was saved with that Pick Tkt Number, Access should take me to that record. If the Pick Number has never been entered, I should be able to continue to fill in all the fields on the form. I was given the following code to use but cant seem to get it to work.

Private Sub Pick_Tkt_Number_AfterUpdate()
If Not IsNull(DLookup("[Pick Tkt Number]", "[Receive BO Parts]", "[Pick Tkt Number]=" & Me![Pick Tkt Number] & "")) Then
Me.RecordsetClone.FindFirst "[Pick Tkt Number]="" & Me![Pick Tkt Number] & """
Me.Bookmark = Me.RecordsetClone.Bookmark
Exit Sub

End If
End Sub

Thanks for any help you can give me with this problem..
Mel
 
If have sent a response to your email with suggestions on what you need to do to get this code to work.
 

Users who are viewing this thread

Back
Top Bottom