Access MS Access: jumping to another record in control.beforeupdate

Ury

Joined
Nov 23, 2005
Messages
1
Reaction score
0
Hi all,

My case is as follows:
When entering a new record, if the value of the 1st field already exists in the table (only on certain circumstances, but never mind about that), I want to change the form's recordsource such that the existing record will be displayed, and the new (partially entered) record will be cancelled.
I am using the EditBox's BeforeUpdate event in order to check the value and *try* to requery the form.

My problem is: I can't cancel the partial record insertion and I can't change the RecordSource value while in the BeforeUpdate event (when i assign the new query to the RecordSource property, I recieve error#2107: "the value you entered doesn't meet the validation rule defined for the field or control". I suspect that it's because the value is not yet updated and still null, which is not allowed).

Any Idea how to solve this?
Thanks in advance,
Ury
 
Back
Top