Find and validate last modified record

rkmaitra

Registered User.
Local time
Today, 02:49
Joined
Jul 11, 2011
Messages
40
Hello,
I am trying to get an event to fire when I move to a new record. I would like this event to check the data validity/integrity of the record I have moved away from. I can do this by the OnCurrent event, but how do I locate the record that I have moved away from/modified?
I am aware of the .LastModified property of a recordset. Is there a similar property for the Form?
Many thanks for your help,
Rudra
 
Your request is not clear. If you changed data, then the form's BeforeUpdate is fired before data is saved. This event is triggered by moving away from the current record. If you did not change data in teh record then there is no point in checking it, is there?
 
Thanks for the reply. The point is, I have a number of fields per record. If I change any particular field value, then the Before/AfterUpdate event works fine. What I would like to do is check that all the data in a particular record are correct - this would be like a validation rule for not just one field but for the entire record. Chiefly, if I navigate away from a record without entering data in all the fields, I would like to check this and take the user back to the record. I have tried a validation rule of 'is not null' for the fields in question but this does not seem to fire if I navigate away by clicking on a different record in the middle of updating the record in question.
Does this make sense?
Thanks,
Rudra
 
If I change any particular field value, then the Before/AfterUpdate event works fine.
Rudra
It sounds to me as though you are talking about the Before/AfterUpdate events of controls on the form, but spikepl is suggesting that you use the form's Before Update event. If the validation fails in this event the updating of the record can be cancelled.
 

Users who are viewing this thread

Back
Top Bottom