I am finding a lot of problems trying to get my VB Access programming to run in VB6. For example I am looking for code which will do the same job as Dlookup and Me.JobNo.
In trying to use Recordset to access my Access 2000 database which has many tables forms and queries I have the following lines of code to start with...
Private Sub Command1_Click()
Dim DB As Database
Set DB = OpenDatabase("C:\000-Quality Control Program\QC4.mdb")
Dim RS As Recordset
Set RS = DB.OpenRecordset("Folder Paths", dbOpenSnapshot)
However I get the following error in Line 3 Set DB = ... Unrecognised database Format 'C:\000-Quality Control\QC4.mdb'.
Folder Paths is one of the many tables in my MS Access 2000 Database QC4.mdb
I have referenced MS DAO 3.51 and MS Access 9.0 Object Libraries but do not know what else to try.
Once again any help is much appreciated.
In trying to use Recordset to access my Access 2000 database which has many tables forms and queries I have the following lines of code to start with...
Private Sub Command1_Click()
Dim DB As Database
Set DB = OpenDatabase("C:\000-Quality Control Program\QC4.mdb")
Dim RS As Recordset
Set RS = DB.OpenRecordset("Folder Paths", dbOpenSnapshot)
However I get the following error in Line 3 Set DB = ... Unrecognised database Format 'C:\000-Quality Control\QC4.mdb'.
Folder Paths is one of the many tables in my MS Access 2000 Database QC4.mdb
I have referenced MS DAO 3.51 and MS Access 9.0 Object Libraries but do not know what else to try.
Once again any help is much appreciated.