MsgBx for DuplicateNon_PrimaryKey

M

mari

Hi -
I need to create a message box that
1. Alerts the user when that "last name" already exists
in the table and
asks them whether they want to add a new record or edit
the record that already exsits for that person.
The option needed is
yes - don't cancel update event and continue with data
entry
no - move to that existing record in the table (as well
as, open the edit form for that record)

I tried a DCount for the peron but the message box always
prompted regardless of existing or non-existing records

The DCOUNT set on beforeupdate for that text box
DCount
("*","tbl_Personnel","NameLast=Screen.ActiveForm.NameLast"
)>0

It always prompts--
help! Thanks in advance - Mari
 

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