If Textbox empty display error

J

jd316632

I've searched the forums but I'm unable to get any code I find to work.
I have a textbox named "txtCallsRcvd" and it is used in a macro whe
"CTR" button is pushed. What I would like to have is a error messag
displayed when the "txtCallsRcvd" is empty.

any help is greatly appreciated
 
S

Steve Schapel

Jd,

Without knowing the details of the macro, it is hard to really know what you
ae doing. But try this for a start... In the macro, possibly before the
existing actions, put something like this:

Condition: [txtCallsRcvd] Is Null
Action: MsgBox
 
J

jd316632

Steve said:
Jd,

Without knowing the details of the macro, it is hard to really kno
what you
ae doing. But try this for a start... In the macro, possibly befor
the
existing actions, put something like this:

Condition: [txtCallsRcvd] Is Null
Action: MsgBox

--
Steve Schapel, Microsoft Access MVP


jd316632 said:
I've searched the forums but I'm unable to get any code I find t work.
I have a textbox named "txtCallsRcvd" and it is used in a macro when
"CTR" button is pushed. What I would like to have is a erro message
displayed when the "txtCallsRcvd" is empty.

any help is greatly appreciated!


Thats headed in the direction I'm wanting to go.

Basically the macro runs a report, however it pulls data input on th
form. If it is empty it will generate a blank report. I would like t
have a code in place to stop the macro entirely if that field is blank
 
S

Steve Schapel

Jd,

Then use a StopMacro action.

Alternatively, put this for the Condition for your OpenReport action...
Condition: [txtCallsRcvd] Is Not Null
 

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