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 DatabaseOption ExplicitPublic Sub Command20_Click()Dim db As DatabaseSet db = CurrentDb()
but changed this to:Option Compare DatabaseOption ExplicitPublic 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?