A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

ADO code with combox box gives errors



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 13th 08, 12:12 AM posted to microsoft.public.outlook.program_forms
Rod
external usenet poster
 
Posts: 32
Default ADO code with combox box gives errors

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


  #2  
Old November 13th 08, 03:48 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default ADO code with combox box gives errors

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" wrote in message
...
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



  #3  
Old November 13th 08, 08:28 PM posted to microsoft.public.outlook.program_forms
Rod
external usenet poster
 
Posts: 32
Default ADO code with combox box gives errors

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

"Ken Slovak - [MVP - Outlook]" wrote:

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" wrote in message
...
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




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Call DLL code from VBScript code-behind Pavel Rosoi Outlook - Using Forms 3 June 23rd 08 07:19 PM
Code 38 certificate errors Richard P. Outlook - Installation 3 June 3rd 08 07:23 AM
Code warning errors appear for some users but not others [email protected] Outlook - Using Forms 3 July 27th 07 01:34 PM
ERRORS since IE 7 BETA 2 and 3- 501 and FOCUS ERRORS- HELP ! trmalo Outlook Express 1 July 19th 06 06:24 PM
code : Code : 800cccd2 scotty971fr Outlook Express 1 January 20th 06 12:59 AM


All times are GMT +1. The time now is 08:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.