> I need the coding to put that in the form's close event for:
> 1. If field1 is not empty or null, field2 can not be empty or null.
==> I would use the Form_BeforeUpdate event instead of the close event.
The code should look something like this:
if isempty(nz(field1,"")) and isempty(nz(field2,"")) and me.dirty then
'handle error, show message, whatever...
cancel=true
endif
> 2. if field1 is selected, field2 must be selected.
==> you CAN NOT have focus on two controls at once, hence you cannot
select both fields at once
Mario R. Osorio
"Begin with the end in mind"