Run macro based on empty field in form

G

Guest

Hi,
I have a form where I require a prompt to appear if the chosen foeld is
empty upon lost focus. I have created a macro to run a simple message box but
I do not want it to run if the field is not empty.
I would appreciate your comments.
Thanks
 
S

Steve Schapel

Trevor,

In the Condition of your MsgBox macro action, put the equivalent of this...
[YourChosenField] Is Null

If you don't see the Conditions column in the macro design window,
select it from the View menu.

It would possibly be more usual to assign this type of macro on the
Before Update event of the form itself. The Lost Focus event of a
control relies on the control getting the focus in the first place.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top