Hi all,
I am in the process of migrating a program from VB5 to VB6 and have run into a problem using queries to retrieve Access recordsets.
The code I am using is as follows:
Option Explicit
Dim GTDBReport As Database
Dim RecReport As Recordset
Private Sub Form_Load()
Set GTDBReport = DBEngine.Workspaces(0).OpenDatabase(GTDBPath)
Set RecReport = GTDBReport.OpenRecordset(ReportString)
The ReportString variable contains and SQL Query with a DLookup function in it.
I am getting an error message "3085 Undefined function 'dlookup' in expression." on execution of the last line.
I am using VB6 and have the Microsoft DAO 3.51 Object Library referenced. The database is Access97.
Any help would be greatly appreciated.
Thanks
Phil
I am in the process of migrating a program from VB5 to VB6 and have run into a problem using queries to retrieve Access recordsets.
The code I am using is as follows:
Option Explicit
Dim GTDBReport As Database
Dim RecReport As Recordset
Private Sub Form_Load()
Set GTDBReport = DBEngine.Workspaces(0).OpenDatabase(GTDBPath)
Set RecReport = GTDBReport.OpenRecordset(ReportString)
The ReportString variable contains and SQL Query with a DLookup function in it.
I am getting an error message "3085 Undefined function 'dlookup' in expression." on execution of the last line.
I am using VB6 and have the Microsoft DAO 3.51 Object Library referenced. The database is Access97.
Any help would be greatly appreciated.
Thanks
Phil