w0od0o
01-16-2009, 04:18 AM
i have created a form with a drop down combo box which looks up my company values in a table but i can not get it to run a query to display the rest of the data for that company,
is this the best way to filter some data with a selection list if so could someone please advise a solution to get it to display the rest of the data
many thanks
w0od0o
PaulJR
01-16-2009, 05:06 AM
First things first, set up a parameter query that gives you the data you want. There is an excellent Microsoft tutorial (if you need it) at the following address:
http://office.microsoft.com/training/Training.aspx?AssetID=RP010969841033&CTT=6&Origin=RC010969991033
Once you have this working, you can link the Criteria (in the query design view), directly to the combo boxes on your form, by using the 'build' tool. Right click on the criteria box to bring up this menu.
Final step, is to add a command button to your form that runs the query. You can select an appropriate command button using the wizard to run a query. When the wizard runs, you will find the 'run query' option in the Misc category.
w0od0o
01-16-2009, 05:34 AM
first off link was great ty :)
i originally set up a query for the data but then realised that i want all data in that field so i removed it and got the data for the combo box straight from the table, is this not correct? or is it better to always use queries even if they gather all info?
the combo box is kinda of like a prompt on a seperate form,........select company name, and then the idea was when i select the company i want from the list and click ok then it would lead me to and invoice form with all of the companies details already in but i can get it to do all of that except it shows the first row of data not the data i select.
ps can i make the data it show (eventually) read only?
many many many thanks
w0od0o