In the "old" days, in order for me to search a "Table" for specific data in a vba statement in a "Form"/"Event" in MS Access 2003, that I chose. I would use the following code:
Set Table_ID = New ADODB.Recordset
Table_ID.CursorLocation = adUseClient
Table_ID.Open "Select * From Table_ID", _
CurrentProject.Connection, adOpenDynamic, adLockOptimistic
The above code gives me the following message when I ran it MS Access 2019:
Microsoft Visual Basic for Application Compile error: User-defined type not defined
I changed the "ADODB" with the database I'm using in MS Access 2019 as follows:
Set Table_ID = New DB002.Recordset
When I ran it again in MS Access 2019, the same message appeared.
Please advise.