Duplicate Entry

R

rr

Hello, I am trying to create a macro that warns a person
if they are re-entering data that is already in the
system. I have a date field and a transaction code field,
basically what I want to do is display a warning message
if the user enters a transaction code AND date that is
already present in the table. Is it easier to use a macro
or is there some other easy way to do this? Any help is
greatly appreciated.

THANK YOU!!!!
 
T

TC

Don't use macros - use events.

The BeforeUpdate event of the form will fire, last thing before Access saves
a new or edited record into your table. In that event, you could use the
DLookup() function to see if the specified record already exists in the
table. Read-up on events, BeforeUpdate, and DLookup in online help.

HTH,
TC
 
R

rr

Thanks for responding. I was wondering if you could give
me an example code to start with. I have read the help
that you suggested, however, if I am not proficient at the
event coding so if I had an example code to start with
using the variables that I mentioned before that would be
great. Thanx!!
 

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