validate

bluesurfer

New member
Local time
Today, 22:44
Joined
Mar 7, 2009
Messages
5
i have form with fields

outlet no:
outlet name:
address:
stock:

(new) (save) -> command buttons

how can i validate
if the previous save record is equal(the same) or not with the new record
 
You could set an index on the underlying table requiring Unique values for the set of fields in question - then Access will automatically restrict a "duplicate" record from being saved (and confront the user with the relevant error message), if that was your ultimate intention.

Otherwise, you would have to build a procedure on your Form's BeforeUpdate event to compare the current record with prior records.

If your only concern was with the Previous record, you could create a RecordsetClone object in an appropriate event (presumably BeforeUpdate) and compare values accordingly using the .Bookmark and .MovePrevious methods.

HTH,
John
 

Users who are viewing this thread

Back
Top Bottom