A complicated FIND record search (1 Viewer)

slcollie

Registered User.
Local time
Today, 01:15
Joined
Jun 6, 2000
Messages
20
I am desperate, trying to figure out a way of entering up to four fields (but possibly only one) and using this data as a search to list all the known records which have this criteria. i think i can do this with a query but can not seem to get the query to take in the data that I input.

but then the complicated part.... from the list of all possibilities I want to be able to choose the record I want and view all the known information on it (possibly another 12 fields within a form). Please help I am all out of ideas.

Sarah P
 

Mitch

Registered User.
Local time
Today, 01:15
Joined
May 23, 2000
Messages
31
Ok there are two ways to go about this, one is to dynamically create the required SQL string, but we can try the easier way first.
On you form you want your four Txt boxes/ Combo Boxes these will be the criteria fields for your query and a list box with it's row source set to your search query. In the query Select the fields you want. Ie the Key and the searchable fields. The Criteria for the searchable fields should be -
Like [Forms]![frmFormName].[txtSearch1] & "*"
In the after update procedure for each of the searches requery the list box. Then for the list boxes double click procedure open the a form to display the data of that record in whatever format you want.

This should work fine if the fields you will search on are fixed ie CboSearch1 looks for the name, cboSearch2 looks for Customer Type etc If these are flexable then we start to get a little complicated, but just reply if we need to go that route.

HTH

Mitch.
 

Users who are viewing this thread

Top Bottom