Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programatically add a query?

Status
Not open for further replies.

jschodde

Technical User
Jan 28, 2001
42
US
Greetings,
I am working on an application that's using an Access 97 database. Since I don't have access to my customer's database (onsite installed on their PC's), how can I create a query in their database?

Is there a way I could distribute an executable to create the query with minimal user intervention?

Thanks,
Jeff
 
I'm assuming you know the path to the mdb and you know how to create a connection to the database.


Dim qry As QueryDef ' your Query
Dim strsql as String ' the sql string for the Query
Set qry = CurrentDb.CreateQueryDef("qry", strsql)

HTH

PsychPt@hotmail.com
 
PsychPt,
Thanks for the quick reply.

Forgive me as I'm not an Access programmer but I understand what you are telling me. I don't know how to create a connection to a database and the path can be different for each customer installation. I'll deal with the path part later.

Could I write this code in Access 2000 and have it update the Access 97 database or do I need to do everything in 97?

-Jeff
 
e-mail me all the information and I'll write it for you.

PsychPt@Hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top