Redundant data rejection

seamusnboo

Registered User.
Local time
Yesterday, 22:02
Joined
Jul 28, 2004
Messages
20
Hi. I'm new to access and I'd appreciate if somebody could help me with a question I have. I have a database that is going to be used to store the quality of the water in the pools of a hotel. The way it's done now is every 3 hours someone check the quality of the water and add chemicals as needed and then put it on a database. All records has date and time. How can I create a system on access that will detect if certain record on a specific date and time was already entered, and in positive case, offer options to ovewrite the current data or reject changes?

Thank you.
 
Not very sophisticated, but...

Not very sophisticated, but... :o

Set Primary Key on Two Fields, your date field and your time field.

For example,

Fields
PoolCheckDate Format Short Date
PoolCheckTime Format Short Time
PoolCheckData Format Short Text

Select the first 2 fields and set both as the primary key. Any attempt to enter data for the same date/time will generate a RI error.

If a dup, cancel that record and simply go to the original record and overwrite the appropriate PoolCheckData.

If you are doing this thru the OrError event, be sure to set Response = 0 to avoid the primary key violation message.

HTH
 

Users who are viewing this thread

Back
Top Bottom