Change Query via Runtime

aqif

Registered User.
Local time
Today, 17:40
Joined
Jul 9, 2001
Messages
158
Hi

I used to change SQL of a particular query during runtime by using the following

CurrentDb.QueryDefs("Qry_temp").sql = "SELECT * FROM QryTemp_All Where ID=" & MyInput

I have used above method in many complex situation in an Access database. Since I have migrated to MS Access Database Project (linked with SQL Server db) these statements are giving me error. What will be an equivalent way to change SQL of a query dynamically in an Access Database Project file?

Also, do any of you know a good step by step example of creating an ADP file?

Thanks
 
Hi,

When you migrated, did you convert the existing access queries into views and stored procedures?

What is acually changing with the sql of this query?
 
Well I just want to change the WHERE clause based on whatever user selects.
 

Users who are viewing this thread

Back
Top Bottom