error with blank option group choice

G

Guest

I posted a Forms question regarding this too, but my question here has to do
with the report component.
The Form question was (to give you some background):
I have a form with some option groups. The default choice is set to no
choice, so it does start out blank.
My question, once you "invoke" that option group you always have to have one
of them selected. Is it possible to reset it to blank/no choices and how?
Now, regarding the report question, let's say my form has a blank option
group. On the report I created, I get #Error.
My text box control source is set
as:=Choose([BreastOp],"breastbx","lumpectomy","mastectomy").
There will be instances when I don't want to "invoke" that option group and
subsequently, there should be no corresponding values on the report.
Please advise.
 
S

strive4peace

"Is it possible to reset it to blank/no choices and how?"

put a command button on the form

[Event Procedure] -->

me.optionGroup_controlname = null,

text box control source on report:

=IIF(IsNull(BreastOp),"",
Choose([BreastOp],"breastbx","lumpectomy","mastectomy"))

or
=Choose(nz([BreastOp],4),"breastbx","lumpectomy","mastectomy","")

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
G

Guest

Crystal,
Thanks for the reply. I went with the nz function and that worked just
great. Really appreciate your help.

strive4peace said:
"Is it possible to reset it to blank/no choices and how?"

put a command button on the form

[Event Procedure] -->

me.optionGroup_controlname = null,

text box control source on report:

=IIF(IsNull(BreastOp),"",
Choose([BreastOp],"breastbx","lumpectomy","mastectomy"))

or
=Choose(nz([BreastOp],4),"breastbx","lumpectomy","mastectomy","")

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


I posted a Forms question regarding this too, but my question here has to do
with the report component.
The Form question was (to give you some background):
I have a form with some option groups. The default choice is set to no
choice, so it does start out blank.
My question, once you "invoke" that option group you always have to have one
of them selected. Is it possible to reset it to blank/no choices and how?
Now, regarding the report question, let's say my form has a blank option
group. On the report I created, I get #Error.
My text box control source is set
as:=Choose([BreastOp],"breastbx","lumpectomy","mastectomy").
There will be instances when I don't want to "invoke" that option group and
subsequently, there should be no corresponding values on the report.
Please advise.
 
S

strive4peace

you're welcome :)

btw, I did not mean to put a comma after the null assignment ... should be:

me.optionGroup_controlname = null

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


Crystal,
Thanks for the reply. I went with the nz function and that worked just
great. Really appreciate your help.

strive4peace said:
"Is it possible to reset it to blank/no choices and how?"

put a command button on the form

[Event Procedure] -->

me.optionGroup_controlname = null,

text box control source on report:

=IIF(IsNull(BreastOp),"",
Choose([BreastOp],"breastbx","lumpectomy","mastectomy"))

or
=Choose(nz([BreastOp],4),"breastbx","lumpectomy","mastectomy","")

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


I posted a Forms question regarding this too, but my question here has to do
with the report component.
The Form question was (to give you some background):
I have a form with some option groups. The default choice is set to no
choice, so it does start out blank.
My question, once you "invoke" that option group you always have to have one
of them selected. Is it possible to reset it to blank/no choices and how?
Now, regarding the report question, let's say my form has a blank option
group. On the report I created, I get #Error.
My text box control source is set
as:=Choose([BreastOp],"breastbx","lumpectomy","mastectomy").
There will be instances when I don't want to "invoke" that option group and
subsequently, there should be no corresponding values on the report.
Please advise.
 

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