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

Report prompt for "ALL" or userid

Status
Not open for further replies.

MBnewbie

Programmer
May 25, 2006
1
US
I have a report that prompts for the userid for selecting records for. I want them to either answer "ALL" and sort by userid or the individual userid that we want to select records for.

This is probably a no-brainer for most of you. But how do I modify the select statement to select according to the answer.
 
I guess you could build the select based on their response...i dont know how youre getting the response, but this is how you would build it if the response was stored in a variable (which ive named Response) :

"Select * FROM tblTable" & IIf(Response<>"All"," WHERE UserID = " & Response) & ";"

-Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top