I have a query in MS-Access which when run prompts for a parameter and then copies data from TableA to A Temp Table. As I need the Query to run more than once how do I pass a parameter once or how do I do this using code?
Thanks
Brian
This conversation is currently closed to new comments.
1. Build the SQL of the query with the parameter(s) in the text, then execute that. [ "Select * From TableName Where Field1 = '" & strField1Parameter & "'"]
2. Use ADO to and the Parameters collection.
Depending on the situation I'll use either. 1 is good for an Access only environment. 2. Is probably better for an MSDE or SQL Server environment.
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Passing an parameter to a Query in access
As I need the Query to run more than once how do I pass a parameter once or how do I do this using code?
Thanks
Brian