use of toggle buttons... (1 Viewer)

zym1ne

Registered User.
Local time
Today, 17:14
Joined
Jul 25, 2003
Messages
34
help with multi choice search forms...

Having had some success from an earlier post today ''Forms/Queries and Data OH My!'' am trying to expand on the advice I was given...

I have now created a search form via the example that someone was kind enough to post in reply to my question...however I can only search by Client (Dealer Name) and not the DID # (ID #) the list of Dealers I can select from populates an un-bound list box on my form and the row source is from a SQL Query code reads as below:

SELECT Dealers.Client, Dealers.dealerID FROM Dealers WHERE (((Dealers.Client) Like Forms!frmDealers!txtSearchBox & "*")) Or (((Dealers.dealerID) Like Forms!frmDealers!txtSearchBox & "*"));

the query is made on my main table (Dealers) were 'Client' is the Dealer name and 'dealerID' is the unique # assigned to each dealer...

My problem I have discovered is that within my list of dealers (all 3897 of them) that not all dealer names are unique and if I perform a search by dealer name alone not all of them are available!!!
If I was able to search by DID# aswell as by name this would eliminate that problem...

Problem is I don't know how this is possible...?????:(

Any help in this would be fantastic :)
 
Last edited:

FoFa

Registered User.
Local time
Today, 11:14
Joined
Jan 29, 2003
Messages
3,672
Have you tried changing your OR to an AND?
...txtSearchBox & "*")) Or (((Dealers.dealerID...
...txtSearchBox & "*")) AND (((Dealers.dealerID...
 

zym1ne

Registered User.
Local time
Today, 17:14
Joined
Jul 25, 2003
Messages
34
Tried the ''AND'' and no joy, still only displaying the Dealer Names
tried swopping the position of the DID# and Client name in the SQL Builder and inserting the ''AND'' but nothing changes still lists only the Clients by name?
 

Users who are viewing this thread

Top Bottom