FIND Button

  • Thread starter Paul Hamel via AccessMonster.com
  • Start date
P

Paul Hamel via AccessMonster.com

I wanted to create a FIND button (binoculars) on my form so i can search
for a customer's last name and have it pull up that record.

Using Access 2000 (therefore cant use the wizard due to bugs in the program)
.. Is there any other way for me to insert that command?

Thanks,
Paul
 
G

Guest

Here's some example code that I have in a text box on one of my forms.
Basically the user just enters the text and pushes enter and it brings up the
record. There is no error checking in this code which would identify if no
records were found and display an error message.

Private Sub txtFind_AfterUpdate()
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
Dim Record As String
Record = Me.txtFind

Me.Volume.SetFocus 'must set focus on the control that is going to be
searched
DoCmd.FindRecord Record, , , , , , True

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top