Need macro help about required fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have an account cancellations db (access 2002) for the company. I need to
have certain fields of the dB required (not left blank). However, these
fields should only be required to be filled in when a status field is changed
to "closed" from the drop down box. Status field has other selections such as
new, not valid etc...
Is there a macro or formula to create links between status field "closed"
and other fields which become required (not left blank) when status changed
to "closed"? I appreciate all your help. Thank you.
 
KI,

One way to do this with a macro is to put the macro on the BeforeUpdate
event of the form. You will need a Condition in the macro, something
like the equivalent of this...
[Status]="closed" And ([a field] Is Null Or [another field] Is Null)
Your macro might have a MsgBox action to tell the user about the
problem, and a CancelEvent action to stop the update.
 
Back
Top