Notify user of duplicate entry in a form

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I have a database that we use to monitor access to a room
and would like to notify the data entry users when they
enter a person's name if they they have previously been
entered into the system that day.

I've created a duplicate records query that searches
today's date and the personindex to return records that
have these two fields identical. However I am having
trouble getting this query to work on the data entry
form. The date is inserted using the Date() function when
a new record is created, and I have combo box that lists
the authorized persons. I would like a message to pop up
when the user selects a staff name that has previously
been entered into the system on that day.

I've tried using the IIf function on the AfterUpdate event
on the combo box to run the duplicate record query using
the staffindex from the form and if it is NOT null to
display a text box. Unfortunately, this has not worked.

Any help is greatly appreciated.

Thanks.
 
Have you considered restricting the dropdown list to only
those authorised persons who have not been previously
entered that day.

Hope This Helps
Gerald Stanley MCSD
 
I have, but we would rather not have the list restricted
that way, and prefer that a message box be displayed. The
second part of this process is to have a pop up report
display when and how the room was accessed, but I'm trying
to get this solved first.

I originally tried creating a multiple field index that
prevented duplicate records, and while that worked the
error message it displayed was too cryptic.

Thanks for the suggestion.
 
-----Original Message-----
I have, but we would rather not have the list restricted
that way, and prefer that a message box be displayed. The
second part of this process is to have a pop up report
display when and how the room was accessed, but I'm trying
to get this solved first.

I originally tried creating a multiple field index that
prevented duplicate records, and while that worked the
error message it displayed was too cryptic.

You could code the form's Error eventHandler to trap the
error and popup your own message.
 
Another Brick Wall Block to a Simple Question...
I think He wants a code assistance on this problem. Not a Simple "Here's
what I would do" nothing answer.
Come on Gerald
 
Back
Top