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

Search Form on Selection

Status
Not open for further replies.

Dinho

Technical User
Feb 16, 2001
10
0
0
IT
I need to make a form wich permit user to search records.

I would like to use the form mode "search on selection", normally selectable through the upper toolbar menu; but i want to clear all toolbar in order to avoid troubles for users. So I need to call search mode through code; but i didn't find how it is possible.

How can I call this Form "mode" with code? or macros?

I hope i have been clear....
 
I don't know if this is what you need but you could use SQL to perform any search you want.

SELECT "fieldYouWant" FROM "tableContainningThoseField" WHERE "conditionOfSearch"

Look this in yhe help.

Use this with a recordset here's an example:

Dim rst As Recordset
Dim SQL As String
Dim Erreur As String
Dim CRLF As String

SQL = "SELECT Bob, Sylvie FROM TablePeople WHERE (SSN = 333);"
Set rst = CurrentDb.OpenRecordset(SQL, dbOpenDynaset)

Then with the rst you can do what you want... If you need more help on this contac me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top