invalid outside procedure

G

Guest

Hi,
I am trying to run that procedure in vb and i get error:
"invalid outside procedure"

the code:
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection <---- here

i add the references i:
microsoft activex data object 2.8 libary
microsoft activex data objects recordset 2.8 libray
microsoft access 11.0 object libary

thanks.
 
M

missinglinq via AccessMonster.com

The question would be, where do you have this code? *invalid outside
procedure* would seem to indicate you don't have it inside of a Sub or a
Function, which, as the messae says, can't be done!

Hi,
I am trying to run that procedure in vb and i get error:
"invalid outside procedure"

the code:
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection <---- here

i add the references i:
microsoft activex data object 2.8 libary
microsoft activex data objects recordset 2.8 libray
microsoft access 11.0 object libary

thanks.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 

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