I usually use this method to search a record. I use the logic below except for the
Set cp = Order.RecordsetClone
is usually
Set cp = Me.RecordsetClone
The form I am searching from is bound to the Customer table. The value I need to search is in the Order table.
This is what I have currently:
dim cp as DAO.Recordset
Set cp = Order.RecordsetClone
cp.FindFirst "Order_ID = " & [cborderid].Value
If cp.NoMatch Then
(enter order logic)
Else
msgbox "DUPLICATE"
End If
cp.Close
The lines in green are there for explination but are not actual code, just trying to lesson the spam and only have the parts I'm trying to correct. I am trying to get a RecordsetClone of the Order table. Anyone know a way I can do this? I have never had to search for a value that was in a different table than my form was bound to when wanting to use the .RecordsetClone method. Many thanks
-G78
Set cp = Order.RecordsetClone
is usually
Set cp = Me.RecordsetClone
The form I am searching from is bound to the Customer table. The value I need to search is in the Order table.
This is what I have currently:
dim cp as DAO.Recordset
Set cp = Order.RecordsetClone
cp.FindFirst "Order_ID = " & [cborderid].Value
If cp.NoMatch Then
(enter order logic)
Else
msgbox "DUPLICATE"
End If
cp.Close
The lines in green are there for explination but are not actual code, just trying to lesson the spam and only have the parts I'm trying to correct. I am trying to get a RecordsetClone of the Order table. Anyone know a way I can do this? I have never had to search for a value that was in a different table than my form was bound to when wanting to use the .RecordsetClone method. Many thanks
-G78