Protect from duplicate attendee records with multiple events

G

Guest

Can I check for duplicate entries while inputting new records in form? I am
using a slightly modified Event Management template from MSN online. Rather
than adding additional events to an existing attendee record, Access adds a
new record. Unfortunately, the appending tables route does not append the
subform info (the events previously attended). Any suggestions?
 
M

Michel Walsh

Hi,


If your table have an index not allowing duplicated value in a field, you
would get an error when trying to append that value.

If you want check BEFORE trying to save the record, you can compute the
DCOUNT returned about that value, like:

If 0 <> DCount( "*", "tablename", "numericalField=" &
numericalValue ) Then
... the numericalValue is already in the field
End If



Hoping it may help,
Vanderghast, Access MVP
 

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