By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

parameters to a query

P: 11
i created a query,i used a command button to run that query, it prompts for parameters.

i have two combo boxes 1)emplname
2)empid

before clicking command button i select empname,empid from two comboboxes.

now i want to use selected data in comboboxes as parameters for a query,instead of enetring data.


pls helpme
Dec 8 '06 #1
Share this Question
Share on Google+
2 Replies


NeoPa
Expert Mod 15k+
P: 31,656
i created a query,i used a command button to run that query, it prompts for parameters.

i have two combo boxes 1)emplname
2)empid

before clicking command button i select empname,empid from two comboboxes.

now i want to use selected data in comboboxes as parameters for a query,instead of enetring data.


pls helpme
What type of query (SELECT or ACTION)?
It would help us to help you if you posted the full SQL of the query you have currently.

PS. It can be done certainly, we just need more info before knowing how to do it in your situation.
Dec 8 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Without more information the best I can do is offer a suggestion by example:

Expand|Select|Wrap|Line Numbers
  1. SELECT empid, emplname 
  2. FROM TableName
  3. WHERE empid=[Forms]![FormName]![Combo1Name]
  4. AND emplname=[Forms]![FormName]![Combo2Name];
  5.  
Mary
Dec 9 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.