My Assistant
![]() ![]() |
|
|
Nov 14 2005, 11:47 AM
Post
#1
|
|
|
New Member Posts: 2 |
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 |
|
|
|
Nov 14 2005, 01:05 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 5,200 From: Denver, Colorado [USA] |
CODE Dim qdf As DAO.QueryDef With CurrentDb Set qdf = .QueryDefs("queryname") qdf.Connect = "yourconnectionstringgoeshere" Set qdf = Nothing End With Welcome to UA! (IMG:http://www.utteraccess.com/forum/style_emoticons/default/cool.gif) |
|
|
|
Nov 17 2005, 04:14 AM
Post
#3
|
|
|
New Member Posts: 2 |
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 |
|
|
|
Nov 17 2005, 08:19 AM
Post
#4
|
|
|
Retired Moderator Posts: 13,544 From: Texas (Is there anywhere else?) |
You need to set a Reference to Microsoft Data Access Object 3.x in the VBE Menu Tools, References.
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 22nd May 2013 - 10:07 PM |