need help on SEARCH box

shenty

Registered User.
Local time
Today, 19:24
Joined
Jun 8, 2007
Messages
119
I have adapted the attached searchDB for what i need - it is very good, thanks to whoever created it.

But....

What i want to do is have 2 search boxes at the top, 1 that filters down JUST the surname field and a 2nd box that searches other fields to filter.

Reason being, i have a applied it to a quotes database, we do a lot of quotes for 2 or 3 customers and i want to be able to filter them before doing a more detailed filter.

Any help appreciated
 

Attachments

Jaeden,

I think that was OldSoftBoss's sample. Very nice.

It shouldn't be that difficult to accomplish this.

Add a combobox with the list of the surnames (cboSurnames).
Do not attach any event to it.

Then on the query (qrySearch) for the listbox, do the following.

1) Note how the Criteria for all of the "other" fields are
"staircased", leave them like that (That's the OR part of the query).

2) For the SurName field, add the criteria:

= Forms!frmMain!cboSurnames

3) Put this same string in the surname column Criteria for EVERY field
that has a criteria (That's the AND part of the query.

You'll have something like (using a little poetic license):

Code:
Forms!frmMain!cboSurnames  Like "*" & [Forms]![frmMain]![txtSearch2] & "*"
Forms!frmMain!cboSurnames	Like "*" & [Forms]![frmMain]![txtSearch2] & "*"
Forms!frmMain!cboSurnames		Like "*" & [Forms]![frmMain]![txtSearch2] & "*"
Forms!frmMain!cboSurnames			Like "*" & [Forms]![frmMain]![txtSearch2] & "*"
Forms!frmMain!cboSurnames				Like "*" & [Forms]![frmMain]![txtSearch2] & "*"


Wayne
 
thanks for reply - will try this on monday morning when i get into the office - will let ya know - thanks again - that was how my mind was working but my fingers weren't absorbing the info properly !

will be back to you
 
tweaked it a bit but its working a treat - thanks for ya help
 

Users who are viewing this thread

Back
Top Bottom