Results 1 to 2 of 2
  1. #1
    Star Lounger
    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?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 93 Times in 89 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
    Does ADO give you any specific error codes?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts