Hi All,
I have 2 comboboxes in a form header to aid in generating a case number (not the PK). They are cboStateCode and cboLocalityCode and are only visible and enabled during a NewRecord. The customer wants this case number generated BEFORE any other data is entered into the form. The cboStateCode may or may not be empty, but the cboLocalityCode should never be empty. The RowSource of cboLocalityCode is determined by the choice (or lack of) from cboStateCode. Right now I have the case number generation code in the OnEnter event of the ‘next’ control the user can Tab into (the ‘first’ control a user is allowed to Tab into in the Details section).
I am stumped as to where I can place my validation code to ensure this. I have tried LostFocus, but I can’t control the SetFocus to return to cboLocalityCode; OnExit, if I am in cboLocalityCode already, won’t let me even escape and Undo the record I have started if I wish to cancel and leave data entry; BeforeUpdate and AfterUpdate do not fire if all I do is to tab into and then out of the ComboBox; the BeforeUpdate of the form is too late because of the above mentioned customer’s wishes.
Where and/or how can I accomplish this?
Thank you.
gdr