Blackelise
aka Andrew
- Local time
- Today, 03:56
- Joined
- Jun 13, 2012
- Messages
- 35
I am trying to implement recordsets but keep getting this error at run time and I can't see why!
The code is:
On execusion strSearchName does contain the correct reference to be found eg "24"
Both InvTo_ID and EstOrd_CustName are set to Long Integer in the tables
I have also tried this:
but get the same error.
any ideas gratfully recieved, thanks.
The code is:
PHP:
Dim rs As DAO.Recordset
Dim strSearchName As String
Set rs = CurrentDb.OpenRecordset("tblCustAddress")
strSearchName = Str(Me.EstOrd_CustName)
If rs.RecordCount <> 0 Then
rst.FindFirst "InvTo_ID = " & strSearchName '<--it fails here!
End If
On execusion strSearchName does contain the correct reference to be found eg "24"
Both InvTo_ID and EstOrd_CustName are set to Long Integer in the tables
I have also tried this:
PHP:
rst.FindFirst "InvTo_ID = " & Me.EstOrd_CustName
any ideas gratfully recieved, thanks.