Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Conversion to Access Project- currentdb

Author  Topic 

blinton25
Yak Posting Veteran

90 Posts

Posted - 2004-02-05 : 11:24:26
Hi,

How is everyone today?

I am in the process of converting an Access database to an Access Project. The data sits in a SQL server database while reports/queries/forms remain in Access.

I got an error:

I had:


Option Compare Database
Option Explicit
Public Sub Command20_Click()
Dim db As Database

Set db = CurrentDb()


but changed this to:



Option Compare Database
Option Explicit
Public Sub Command20_Click()

Dim db As ADODB.Connection

Set db = CurrentProject.Connection


which works ok.

Now later in the code I have:



Private Sub Command1_Click()

Dim db As ADODB.Connection



which gives me the following error:

'Compile error: User-defined type not defined'

I am not sure why this is happening, any suggestions?
   

- Advertisement -