ProgrammingB52
Technical User
I am having a library problem. I went to tools->references and dont which libraries to use. It compiled and ran fine before, but all of a sudden it doesn't recognize ADODB.Recordset and CurrentProject.Connection
Public Sub removedashUPClist()
Dim cnn As Connection
Dim rst As ADODB.Recordset
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset
rst.Open "currentTbl" cnn, adOpenKeyset, adLockOptimistic
cnn.Close
End Sub
With Set rst = New ADODB.Recordset
I got "compile error: User-defined function not defined"
Then I changed the library, took out the DAO library.
Then I got runtime error "type mismatch" with the statement
Set cnn = CurrentProject.Connection. What library's do I need to be using, or what shouldn't I be using?
Public Sub removedashUPClist()
Dim cnn As Connection
Dim rst As ADODB.Recordset
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset
rst.Open "currentTbl" cnn, adOpenKeyset, adLockOptimistic
cnn.Close
End Sub
With Set rst = New ADODB.Recordset
I got "compile error: User-defined function not defined"
Then I changed the library, took out the DAO library.
Then I got runtime error "type mismatch" with the statement
Set cnn = CurrentProject.Connection. What library's do I need to be using, or what shouldn't I be using?