MrDeveloper
Programmer
Hi,
I have a form where users select a value from a list. This value is then stored in a text-field variable on the form itself. I then want to run a query that is based on the chosen value.
As a fictional example: Select a Car Manufacturer. Value displayed in the form text-field is then set to 'Mazda', so I then want the query to say "display all cars that are a Mazda".
My query therefore looks like:
SELECT [Cars].[Car_ID], [Cars].[Type], [Cars].[Engine] FROM Cars WHERE ((([Cars].Type)=[Forms]![frmReports]![Text4]))
Problem is, when I run it, the starting form successfully has the car model in the text-box at run-time but as the query is run (activated by button and subsequent report on the form), it prompts for the value of [Cars].[Type] to be entered in a pop-up box! I wish to automate this so the user simply specifies the type earlier on and can then run a report against the chosen form value rather than type it in each time.
Any advice where I am going wrong or whether this is simply impossible to achieve, very much appreciated!
Kind Regards,
I have a form where users select a value from a list. This value is then stored in a text-field variable on the form itself. I then want to run a query that is based on the chosen value.
As a fictional example: Select a Car Manufacturer. Value displayed in the form text-field is then set to 'Mazda', so I then want the query to say "display all cars that are a Mazda".
My query therefore looks like:
SELECT [Cars].[Car_ID], [Cars].[Type], [Cars].[Engine] FROM Cars WHERE ((([Cars].Type)=[Forms]![frmReports]![Text4]))
Problem is, when I run it, the starting form successfully has the car model in the text-box at run-time but as the query is run (activated by button and subsequent report on the form), it prompts for the value of [Cars].[Type] to be entered in a pop-up box! I wish to automate this so the user simply specifies the type earlier on and can then run a report against the chosen form value rather than type it in each time.
Any advice where I am going wrong or whether this is simply impossible to achieve, very much appreciated!
Kind Regards,