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

query by "prompt for criteria"

Status
Not open for further replies.

yamy

Technical User
Nov 22, 2002
54
US
My database contains many companies in many countries.
How do I write one query that prompts for the country while the rest of the fields stay the same?
Rather than write thirty separate queries that are identical except for the "criteria"

Code:
SELECT Count(RMUserDetailsJan13,[AccountActivated]) AS [CountOfAccountActivated], Count(RMUserDetailsJan13.Registered) AS CountOfRegistered, Count(RMUserDetailJan13.ID) AS COuntOfID, RMUserdetailsJan13.[CountryName]
FROM RMUserDetailsJan13.[CountryName]
GROUPBY RMUserDetailsJan13.[CountryName]
HAVING (((RMUserDetailsJan13.[CountryName])="argentina"));

all comments welcome!
thanks
yamy
 
How about setting the Criteria for [CountryName] to:

Forms!frmName![txtCountryName]

with a txt/list/combo box on your form?

You're not alone,

TomCologne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top