tbrooks
Nov 14 2005, 11:47 AM
Hi All,
Im new to this forum and hope that someone can help me. I wish to use some vba code to automate the initialization of query properties. Specifically, I want to set the value for the odbc connect string in an sql pass-through query.
The access help pages do say that this can be done, it doesnt show how though. Any help would be great.
Tz
schroep
Nov 14 2005, 01:05 PM
CODE
Dim qdf As DAO.QueryDef
With CurrentDb
Set qdf = .QueryDefs("queryname")
qdf.Connect = "yourconnectionstringgoeshere"
Set qdf = Nothing
End With
Welcome to UA!
tbrooks
Nov 17 2005, 04:14 AM
Hey, this is great. However, I dont seem to have the add-ins in my ms access for data access objects. Would appreciate some pointers of how to get these.
Tz
truittb
Nov 17 2005, 08:19 AM
You need to set a Reference to Microsoft Data Access Object 3.x in the VBE Menu Tools, References.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.