how to setvalue in check box

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

Guest

Hi,
I have a form has a combo box and check box and I made a macro to set value
in this form. The value in the combo box has been set but and the value in
the check box still as the previous value. The macro argument as follows:

Setvalue >>>> item: [Forms]![Add requirements for dispaly employee in INST
Group]![Combo25] , expression: ‘ ‘
GoToControl >>>> Control Name: [Combo25]

Can any body help me solving this problem?
Thanks!!
 
Jon,

What do you want to set the value of the checkbox to? And what are the
Item and Expression arguments that you have used in your macro?

By the way, I notice you are setting the value of the combobox to a
zero-length string "". This would normally be a bad idea. Assuming you
are in fact trying to clear the combobox then the Expression argument
should be set to:
Null
 
Hi,
I need the check box value to be unchecked. When I open the form and if
there is a data for specific employee the old data appears and if there is no
data for the employee every thing is ok. But the problem appears once if
there is a data for the employee. So, I set the value to be empty for the
list box and the check box , it is not. If you have a good idea please advice?
Thank you so much.



Steve Schapel said:
Jon,

What do you want to set the value of the checkbox to? And what are the
Item and Expression arguments that you have used in your macro?

By the way, I notice you are setting the value of the combobox to a
zero-length string "". This would normally be a bad idea. Assuming you
are in fact trying to clear the combobox then the Expression argument
should be set to:
Null

--
Steve Schapel, Microsoft Access MVP
Hi,
I have a form has a combo box and check box and I made a macro to set value
in this form. The value in the combo box has been set but and the value in
the check box still as the previous value. The macro argument as follows:

Setvalue >>>> item: [Forms]![Add requirements for dispaly employee in INST
Group]![Combo25] , expression: ‘ ‘
GoToControl >>>> Control Name: [Combo25]

Can any body help me solving this problem?
Thanks!!
 
Check boxes only accept values of True, False or Null. True is checked,
False is unchecked and Null is grayed out.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jon said:
Hi,
I need the check box value to be unchecked. When I open the form and if
there is a data for specific employee the old data appears and if there is
no
data for the employee every thing is ok. But the problem appears once if
there is a data for the employee. So, I set the value to be empty for the
list box and the check box , it is not. If you have a good idea please
advice?
Thank you so much.



Steve Schapel said:
Jon,

What do you want to set the value of the checkbox to? And what are the
Item and Expression arguments that you have used in your macro?

By the way, I notice you are setting the value of the combobox to a
zero-length string "". This would normally be a bad idea. Assuming you
are in fact trying to clear the combobox then the Expression argument
should be set to:
Null

--
Steve Schapel, Microsoft Access MVP
Hi,
I have a form has a combo box and check box and I made a macro to set
value
in this form. The value in the combo box has been set but and the value
in
the check box still as the previous value. The macro argument as
follows:

Setvalue >>>> item: [Forms]![Add requirements for dispaly employee in
INST
Group]![Combo25] , expression: ' '
GoToControl >>>> Control Name: [Combo25]

Can any body help me solving this problem?
Thanks!!
 
Hi,
Thanks for reply, I want it to be null once the form loaded. Please advice??




Douglas J. Steele said:
Check boxes only accept values of True, False or Null. True is checked,
False is unchecked and Null is grayed out.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jon said:
Hi,
I need the check box value to be unchecked. When I open the form and if
there is a data for specific employee the old data appears and if there is
no
data for the employee every thing is ok. But the problem appears once if
there is a data for the employee. So, I set the value to be empty for the
list box and the check box , it is not. If you have a good idea please
advice?
Thank you so much.



Steve Schapel said:
Jon,

What do you want to set the value of the checkbox to? And what are the
Item and Expression arguments that you have used in your macro?

By the way, I notice you are setting the value of the combobox to a
zero-length string "". This would normally be a bad idea. Assuming you
are in fact trying to clear the combobox then the Expression argument
should be set to:
Null

--
Steve Schapel, Microsoft Access MVP

Jon wrote:
Hi,
I have a form has a combo box and check box and I made a macro to set
value
in this form. The value in the combo box has been set but and the value
in
the check box still as the previous value. The macro argument as
follows:

Setvalue >>>> item: [Forms]![Add requirements for dispaly employee in
INST
Group]![Combo25] , expression: ' '
GoToControl >>>> Control Name: [Combo25]

Can any body help me solving this problem?
Thanks!!
 
Douglas J. Steele said:
Check boxes only accept values of True, False or Null. True is checked,
False is unchecked and Null is grayed out.

With one caveat -- if the checkbox is bound to a Boolean (yes/no, etc.)
datatype field, the only values it can accept are True or False. The
checkbox must be unbound or bound to a Numeric datatype field in order to
accept a Null value.
 
Ken Snell (MVP) said:
With one caveat -- if the checkbox is bound to a Boolean (yes/no, etc.)
datatype field, the only values it can accept are True or False. The
checkbox must be unbound or bound to a Numeric datatype field in order to
accept a Null value.

Good point, Ken. I did neglect to mention that, didn't I?
 
And I forgot to mention that the checkbox's Triple State property needs to
be set to Yes in order for it to correctly handle a Null for the situations
where a checkbox can be set to Null value.
 
Back
Top