Peter Bellamy
Registered User.
- Local time
- Today, 09:16
- Joined
- Dec 3, 2005
- Messages
- 295
I am using this for the first time and cannot gett he code to run,it errors with "Operation is not supported with this object"
I have seen that before and it has been a format problem, but I can't see it !!
The rec.seek line work perfectly ??
Public Function GetReturnRecNos(StrSerialNo As String)
Dim rec As Recordset
Dim n As Integer
On Error GoTo err_handler
' check for serial number = goods_aserial and bring back goods_recno, the Return Record nos
Set rec = CurrentDb().OpenRecordset("Goods")
rec.Index = "goods_aserialno"
If rec.NoMatch = True Then
MsgBox "No Match of " & StrSerialNo
Else
'rec.Seek "=", StrSerialNo
rec.FindFirst "goods_aserialno = " & StrSerialNo
Debug.Print "Serial No " & StrSerialNo & " in Return Record No " & rec("goods_recno")
End If
Can anyone help me please ?
I have seen that before and it has been a format problem, but I can't see it !!
The rec.seek line work perfectly ??
Public Function GetReturnRecNos(StrSerialNo As String)
Dim rec As Recordset
Dim n As Integer
On Error GoTo err_handler
' check for serial number = goods_aserial and bring back goods_recno, the Return Record nos
Set rec = CurrentDb().OpenRecordset("Goods")
rec.Index = "goods_aserialno"
If rec.NoMatch = True Then
MsgBox "No Match of " & StrSerialNo
Else
'rec.Seek "=", StrSerialNo
rec.FindFirst "goods_aserialno = " & StrSerialNo
Debug.Print "Serial No " & StrSerialNo & " in Return Record No " & rec("goods_recno")
End If
Can anyone help me please ?