I have problem in the following code :
Set con = Application.CurrentProject.Connection
Set rs = CreateObject("ADODB.Recordset")
stSql = "SELECT * FROM [SB Items] "
stSql = stSql & "WHERE [SBID]=" & Me![SBID] & " AND [ItemNumber]=" & intBtn
rs.Open stSql, con, 1 ' 1 = adOpenKeyset
' If no item matches, report the error and exit the function.
If (rs.EOF) Then
MsgBox "There was an error reading the SB Items table."
rs.Close
Set rs = Nothing
Set con = Nothing
Exit Function
End If
Since when i execute the above sql command inside stSql which resulting in only ONE row
The control is going to the error block
and message box poping out saying "There was an error reading the SB Items table"