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 Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Rod" <(E-Mail Removed)> wrote in message
news:1D5012EC-3DA9-4FB6-8F29-(E-Mail Removed)...
>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
>
>