Receiving the following error message, with a onclick event from an Access Form module. Below is the code, any thoughts suggestions or flames will be appericated.
Option Compare Database
Dim dbs As Database
Dim rstDocs As Recordset
Private Sub cmdGenerate_Click()
'On Error GoTo Err_Generate_Click
'declare some vars
Dim qdf As QueryDef
Dim intX As Integer
Dim strDate As String
Dim strTime As String
Dim strDoctorID As String
Dim strDoctorName As String
Dim strMsg As String
strDate = Me.txtsDate
strTime = Me.txtsTime
strDoctorID = Me.txtDoctorID
Set dbs = CurrentDb()
'dbs.OpenRecordset (qryDoctors)
Set qdf = dbs.QueryDefs(qryDoctors) ******* This where access chokes
qdf![DoctorID] = strDoctorID
Set rstDocs = qdf.OpenRecordset
Do while ..............
Option Compare Database
Dim dbs As Database
Dim rstDocs As Recordset
Private Sub cmdGenerate_Click()
'On Error GoTo Err_Generate_Click
'declare some vars
Dim qdf As QueryDef
Dim intX As Integer
Dim strDate As String
Dim strTime As String
Dim strDoctorID As String
Dim strDoctorName As String
Dim strMsg As String
strDate = Me.txtsDate
strTime = Me.txtsTime
strDoctorID = Me.txtDoctorID
Set dbs = CurrentDb()
'dbs.OpenRecordset (qryDoctors)
Set qdf = dbs.QueryDefs(qryDoctors) ******* This where access chokes
qdf![DoctorID] = strDoctorID
Set rstDocs = qdf.OpenRecordset
Do while ..............