Results 1 to 2 of 2
2011-03-28, 11:08 #1
- Join Date
- Aug 2002
- Wichita, Kansas, USA
- Thanked 0 Times in 0 Posts
Outlook custom form - vba database reference
I have custom oulook forms that feed data from the forms to Access dbases.
The forms have been in existance for some time and have quit working now that we have installed Office 2010.
The forms use the references
Set dbe = Item.application.createobject("dao.dbengine.36")
Set wks = dbe.workspace(0)
Set dbs = wks.opendatabase(dbase path & name)
Set rst = dbe.openrecordset(dbase table)
I believe these lines are the culprits when using 2010, but I haven't had any luck converting them to anything that works. I have been searching the internet and have tried various combinations of adodb and ado but am not getting anywhere.
Can someone please guide me in the right direction?
2011-04-03, 12:24 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 94 Times in 90 Posts
To find good articles on converting DAO to ADO you probably have to go back 10 years or so...
Something like this might help open a table in Access:
Dim objConnA, rst ' Set up connection object and set provider for local Access database Set objConnA = CreateObject("ADODB.Connection") objConnA.Provider = "Microsoft.Jet.OLEDB.4.0" ' Open the connection objConnA.Open "path\to\database" ' Set up recordset and open table Set rst = CreateObject("ADODB.Recordset") rst.Open "Table1", objConnA