Thanks for the replies. I started a thread but my network was down and I can't find my thread. Am using VB6.0 and developing a result checker.
I want to search records from an Access database using four fields from the database.
This is the code I have but I have this error
Object Variable or with block not set and the line of code is this objobjRs.open Sqlstmt objConn, ,2,2
Expand|Select|Wrap|Line Numbers
- sqlStmt = "select * from candres where ExamSeries='" & Exam_Sr & "' and ExamYear= '" & Exam_Yr & "' and CentNo='" & cbosch & "' and IndexNo='" & Cand_No & "'"
- objobjRS.Open sqlStmt, objConn, , 2, 2
- If Not (objobjRS.EOF) Then
- frmCandResult.Show vbModal, Me
- Else
- MsgBox "sorry not a perfect match"
- End If
Thanks