Can anyone tell me why I'm getting a type mismatch error with the following code. I have a form with a DAO control and patient_numbers is the name of a table in the database but the error arises with the Set rs = db....etc line.
Option Explicit
Dim db As Database
Dim rs As Recordset
Private Sub Form_Load()
Set db = OpenDatabase("H:\My Documents\PatientNumbers\patientNumbers.mdb"
Set rs = db.OpenRecordset("patient_numbers"
End Sub
Option Explicit
Dim db As Database
Dim rs As Recordset
Private Sub Form_Load()
Set db = OpenDatabase("H:\My Documents\PatientNumbers\patientNumbers.mdb"
Set rs = db.OpenRecordset("patient_numbers"
End Sub