Discussion Locked

ODBC & Access 2000

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How do I open a ODBC file in a VB module in Access 2000? I am using the following:

Dim cnn1 As ADODB.Connection
Dim rst1 As ADODB.Recordset
Set cnn1 = New ADODB.Connection
Set rst1 = New ADODB.Recordset
cnn1.Open "DSN=GP;USERID=lincabc;PASSWORD=xxxxx;"
rst1.Open "LINC.PROPDB_CUST", cnn1, adOpenDynamic, adLockReadOnly, adCmdTableDirect

I am unable to use any fields because BOF & Eof are true.

3 replies

by john_wills

This isn't really an answer to your question, and may not be applicable to your situation. Link the ODBC table to your Access database. Address it then as though it were a table local to your database. When the table gts addressed there is an automatic pop-up asking for username and password.

This discussion is closed to new replies.