ADO code with combox box gives errors

  • Thread starter Thread starter Rod
  • Start date Start date
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
 
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.
 
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
 
Back
Top