B
blinton25
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 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?
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 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?