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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Searching..... 1

Status
Not open for further replies.

KZWings

IS-IT--Management
Jan 30, 2003
2
US
I'm currently using Microsoft Access2002 and i have a table that eventually will get very large. I want to make a search in the table by having a message box pop up (from a hover button) and having the user enter a value (last name, for example) and then search the table and bring up the results. The results can show up as a form or a table. Thanks for the help, suggestions, and/or ideas. :)
 
Using a form, you can put some VB code in the OnOpen event to filter the form's data:

Private Sub frmMyTestForm_Open (Cancel as Integer)

Dim strLastName as String

strLastName = InputBox ("Enter a last name:")

If strLastName <> &quot;&quot; Then ' if the user did not click cancel

Me.Filter = &quot;LastName = '&quot; & strLastName & &quot;'&quot;
Me.FilterOn = True

End If

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top