Thread: Outlook custom form - vba database reference

1. 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?

2. 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:

Code:
Dim objConnA, rst
' Set up connection object and set provider for local Access database
objConnA.Provider = "Microsoft.Jet.OLEDB.4.0"
' Open the connection
objConnA.Open "path\to\database"
' Set up recordset and open table
rst.Open "Table1", objConnA