paul.hartland at fsmail.net
paul.hartland at fsmail.net
Fri Mar 2 04:43:10 CST 2007
To All,
I have a visual basic form with an ADO Data Control on, I have left the connection string blank as I need to set this at runtime (which I can do). I have however put the following query in the RecordSource:
SELECT UserID, DisplayName, EmailAddress FROM tblSysHERMESUsers WHERE Enable =1
When I try a find on te recordset I get the error Object Variable or With Block Variable Not Set on the following code line
With oLogon
strFind = "[Password] = '" & .txtPassword.Text & "'"
.ADOLogon.Recordset.Find strFind, , adSearchForward, adBookmarkFirst
If (.ADOLogon.Recordset.BOF Or .ADOLogon.Recordset.EOF) Then
MsgBox "Not Found"
Else
MsgBox "Found"
End If
End With
Has anyone any idea why I get this error ?
Thanks in advance for any help on this.
Paul Hartland
paul.hartland at fsmail.net
07730 523179