G
Guest
Hi, thanks for the poeple who have helped me so far with this. First time SQL
User.
What I want is the user to be able to select a search type (NetBIOS, Serial
Number or Service Tag) and then senter their search value in a text box and
hit search. The results come up in another form. The query is to select the
match only for the value type specified by the user - ie search only Serial
Nuimbers if that's selected etc
The sql query I have is this:
SELECT *
FROM Client INNER JOIN Hardware ON Client.Client_Code = Hardware.Client_Code
WHERE (((Switch([FORMS]![Main Menu]![SearchParam]='NetBIOS',
[NetBIOS_Name]=[FORMS]![Main Menu]![SearchValue],
[FORMS]![Main Menu]![SearchParam]='Serial Number',[Serial_Num]=[FORMS]![Main
Menu]![SearchValue],
[FORMS]![Main Menu]![SearchParam]='ServiceTag',[Service_Tag]=[FORMS]![Main
Menu]![SearchValue]))<>False));
The '<>False' bit was tacked on there automatically. No idea what it means =P
Thanks in advance for any help. I originally had seperate search queries for
each option but management has decided that they want one uber-form to
display all the results. Eep.
cheers
User.
What I want is the user to be able to select a search type (NetBIOS, Serial
Number or Service Tag) and then senter their search value in a text box and
hit search. The results come up in another form. The query is to select the
match only for the value type specified by the user - ie search only Serial
Nuimbers if that's selected etc
The sql query I have is this:
SELECT *
FROM Client INNER JOIN Hardware ON Client.Client_Code = Hardware.Client_Code
WHERE (((Switch([FORMS]![Main Menu]![SearchParam]='NetBIOS',
[NetBIOS_Name]=[FORMS]![Main Menu]![SearchValue],
[FORMS]![Main Menu]![SearchParam]='Serial Number',[Serial_Num]=[FORMS]![Main
Menu]![SearchValue],
[FORMS]![Main Menu]![SearchParam]='ServiceTag',[Service_Tag]=[FORMS]![Main
Menu]![SearchValue]))<>False));
The '<>False' bit was tacked on there automatically. No idea what it means =P
Thanks in advance for any help. I originally had seperate search queries for
each option but management has decided that they want one uber-form to
display all the results. Eep.
cheers