Error Message

  • Thread starter rebecky via AccessMonster.com
  • Start date
R

rebecky via AccessMonster.com

I have 2 tables, one for emloyers and 1 for job order info
The two tables and forms are related by Employer ID. There is a Main form
with Employer information and a subform for Job orders. I want to warn the
user that what ever position they just typed, may already exist for that
employer (If in fact the position has already been entered) in the
beforeupdate event of the JobOrderInfo subform.[PositionType]text box.

I just get this error message:

"compile error: wrong of number arguments or invalid property assignment."

I am just trying to warn users of a possible duplicate entry in a "field" in
a record, not the database. Here is what I have attached to the
"beforeUpdate" event.

If Not IsNull("[PositionType]", "JobOrderInfo", "[EmployerID] = " &
Me.EmployerID & " AND [PositionType] = """ & Me.PositionType & """") Then
MsgBox "some message with a warning of duplicate entry"
Cancel = True
Me.Undo
End If
 
R

rebecky via AccessMonster.com

How would I write it? I have been stuck on this for a while.....thanks.
You are trying to use IsNull for more than one field and it is for one field.
I have 2 tables, one for emloyers and 1 for job order info
The two tables and forms are related by Employer ID. There is a Main form
[quoted text clipped - 17 lines]
Me.Undo
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top