LPurvis
AWF VIP
- Local time
- Today, 00:46
- Joined
- Jun 16, 2008
- Messages
- 1,269
You'd not got the validation rules as I'd mentioned.
You'd placed them in the individual fields, this meant they behaved effectively just as the Required property.
They needed to be in the table validation.
So that it is checked when the record is committed.
Bear in mind that such table level validation is generally your safety net.
You would often perform application checking first to provide a more friendly user experience (and message).
For example the validation rule would stop the record being commited - but not necessarily your form from closing.
You also had some calls of
Me.Refresh
This is, as I was saying, causing the record to be committed.
(That's exactly what it does - forces a commit and updates the data from the loaded records).
There's no need for a Refresh where you had it.
Just requering the individual combo's is all you need.
(And I'd always use the Requery method of the control to do that rather than the DoCmd method).
Have fun.
Cheers.
You'd placed them in the individual fields, this meant they behaved effectively just as the Required property.
They needed to be in the table validation.
So that it is checked when the record is committed.
Bear in mind that such table level validation is generally your safety net.
You would often perform application checking first to provide a more friendly user experience (and message).
For example the validation rule would stop the record being commited - but not necessarily your form from closing.
You also had some calls of
Me.Refresh
This is, as I was saying, causing the record to be committed.
(That's exactly what it does - forces a commit and updates the data from the loaded records).
There's no need for a Refresh where you had it.
Just requering the individual combo's is all you need.
(And I'd always use the Requery method of the control to do that rather than the DoCmd method).
Have fun.
Cheers.