10 pts.
 Compile Error
I am trying to prevent duplicate job orders from being entered for the same employer. The employer is in the main form and the job order is in the subform. I have this code attached to the "beforeupdate" event of the control on the subform but I get a compile error: wrong number or arguments or invalid property assignment. Can you see what is wrong? If Not IsNull("[PositionType]", "JobOrderInfo", "[EmployerID] = " & Me.EmployerID & " AND [PositionType] = """ & Me.PositionType & """") Then MsgBox "Already There" Cancel = True Me.Undo End If

Software/Hardware used:
ASKED: August 28, 2008  7:55 PM
UPDATED: August 30, 2008  9:05 AM

Answer Wiki:
Is it possible that you mean <pre>If Not IsNull(DLookup("[PositionType]", "JobOrderInfo", "[EmployerID] = " & Me.EmployerID & " AND [PositionType] = """ & Me.PositionType & """") )Then </pre> as the intended code?
Last Wiki Answer Submitted:  August 30, 2008  9:05 am  by  BobBeechey   750 pts.
All Answer Wiki Contributors:  BobBeechey   750 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _