Hello all, VB keeps giving me this error code
'The connection cannot be used to perform this operation. It is either closed or invalid in this context.'
Private Sub Form_Load()
Dim pstDoctorSQL As String
frmDoctors.WindowState = 2
pstDoctorSQL = "SELECT * FROM tblDoctor " & _
"WHERE DocStatus = True " & _
"ORDER BY DocNum"
mrsDoctor.Open pstDoctorSQL, gcnTDLabs, adOpenStatic, adLockOptimistic, adCmdText
If mrsDoctor.RecordCount > 0 Then
it doesnt like the line "mrsDoctor.Open pstDoctorSQL, gcnTDLabs, adOpenStatic, adLockOptimistic, adCmdText"
can someone please help me ?
Last edited by loquin; 04-10-08 at 18:03.
Reason: add [code] [/code] tags for readability.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert