Validation of combo box

J

Jasper de Bruin

I want to use the value of a combo box in a macro, after
clicking a button next to it. So you select a value in the
combo box, nothing happens, and then you click on the
button, and the macro is started.

Is it possible to validate the combo box so that you have
to select a value? The validate function of the box itself
only works if you click the box, if you just leave it
blank (leave it as it is: blank) and click the button it
doesnt validate.

Is it possible to validate the combo box just when
clicking the button? How?

Thanks a lot!
 
N

Nikos Yannacopoulos

In the macro design window, display the conditions column
(menu view > conditions).
Insert two new lines at the top; in the first line put in
the condition something like
"IsNull([Forms]![FormName].[ControlName])=True"
(put in the right names for your form and control),and in
the action next to it a message box. In the second line,
put three dots in the condition (this means carry out
action if the previous condition is met) and in the action
StopMacro.

Nikos Y. (nyannaco at in dot gr)
 
G

Guest

Thanks man, it helped me a lot!
-----Original Message-----
In the macro design window, display the conditions column
(menu view > conditions).
Insert two new lines at the top; in the first line put in
the condition something like
"IsNull([Forms]![FormName].[ControlName])=True"
(put in the right names for your form and control),and in
the action next to it a message box. In the second line,
put three dots in the condition (this means carry out
action if the previous condition is met) and in the action
StopMacro.

Nikos Y. (nyannaco at in dot gr)
-----Original Message-----
I want to use the value of a combo box in a macro, after
clicking a button next to it. So you select a value in the
combo box, nothing happens, and then you click on the
button, and the macro is started.

Is it possible to validate the combo box so that you have
to select a value? The validate function of the box itself
only works if you click the box, if you just leave it
blank (leave it as it is: blank) and click the button it
doesnt validate.

Is it possible to validate the combo box just when
clicking the button? How?

Thanks a lot!
.
.
 

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