ADO code with combox box gives errors

R

Rod

I am trying to populate a combo box with records from an Access data table.
I think this is possible using ADO, so I wrote the routine to populate the
combo when the form is opened. Every time I open the form, I get an error
saying "Expected end of statement line3". Line 3 is: "Dim Conn1 As New
adodb.Connection". It is really the first line of code in the Open_Item
function. If I can get by this error, I think I can figure the rest out.

Rod
 
K

Ken Slovak - [MVP - Outlook]

Is this code running in an Outlook custom form? If so it uses VBScript code
and all objects are Variant and don't take As clauses. Use only Dim Conn1.

If this code is running in an Access form then please post your question in
an Access group as it would have nothing to do with Outlook.
 
R

Rod

Ken,

Yes, this form is in Outlook. Your answer was most helpful. It reminded me
of the language (VBScript), Outlook is using. That makes it easier to ask
the right question and get the correct answer.

rod
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top