Auto list member does not work

M

mosow

I am trying to get the auto list member function to work when I am
coding in Microsoft Visual Basic in my Access 2003 database. I have
checked and the references to the objects I am using are there. But,
the intellisense feature never brings up my methods/properties when I
code. It works find in Access 97 and if I use the MSE editor on its
own.

Any help?

TIA
 
M

mosow

I found my answer to why Intellisense was not working. I was using
CreateObject to establish the controls.

This does not work with Intellisense:

Set oCn = CreateObject("ADODB.Connection")
Set oCn = ADODB.Connection
Set oRs = CreateObject("ADODB.Recordset")
Set fso = CreateObject("Scripting.FileSystemObject")

Thgis does work with Intellisense:

Dim oCn As ADODB.Connection
Dim oRs As ADODB.Recordset
Dim fso As FileSystemObject
 
D

Douglas J Steele

Just to be pedantic, using CreateObject isn't the issue. It's strictly the
Dim statements that matter.

Dim oCn As ADODB.Connection
Dim oRs As ADODB.Recordset
Dim fso As FileSystemObject

Set oCn = CreateObject("ADODB.Connection")
Set oRs = CreateObject("ADODB.Recordset")
Set fso = CreateObject("Scripting.FileSystemObject")

will work just as well as

Dim oCn As ADODB.Connection
Dim oRs As ADODB.Recordset
Dim fso As FileSystemObject


Set oCn = New ADODB.Connection
Set oRs = New ADODB.Recordset
Set fso = New Scripting.FileSystemObject

You must have either been declaring them as Object, or (even worse) not
declaring them at all.
 

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