Compile Error

10 pts.
Tags:
Compile error
Database programming
Microsoft Access
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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?

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: