Displaying Yes fields but not NO

G

Guest

I hope you can help, Ive looked through the forum but i seem to be a bit
stuck as i cant find anything that seems to fix the problem:

I have a table which has several fields with a "yes/no" data type.

I want to run a report which displays only the fields marked "yes" and
ignore/blank out any fields marked "no"

Can anyone help?
 
C

chriske911

Althekid has brought this to us :
I hope you can help, Ive looked through the forum but i seem to be a bit
stuck as i cant find anything that seems to fix the problem:
I have a table which has several fields with a "yes/no" data type.
I want to run a report which displays only the fields marked "yes" and
ignore/blank out any fields marked "no"
Can anyone help?

textfield_ofyourchoice.visible = not Abs([yes_no_field])

since true is equal to 0 the not expression will turn it into a 1
meaning the textfield is only visible when the fieldvalue is true/yes

grtz
 
G

Guest

Thank you for your prompt reply.
Forgive me for being a bit dim! but could you please guide me as to where i
need to enter this code?

chriske911 said:
Althekid has brought this to us :
I hope you can help, Ive looked through the forum but i seem to be a bit
stuck as i cant find anything that seems to fix the problem:
I have a table which has several fields with a "yes/no" data type.
I want to run a report which displays only the fields marked "yes" and
ignore/blank out any fields marked "no"
Can anyone help?

textfield_ofyourchoice.visible = not Abs([yes_no_field])

since true is equal to 0 the not expression will turn it into a 1
meaning the textfield is only visible when the fieldvalue is true/yes

grtz
 
R

Rick Brandt

Althekid said:
Thank you for your prompt reply.
Forgive me for being a bit dim! but could you please guide me as to
where i need to enter this code?

To clarify... Do you want records with the value "No" to be filtered out or do
you want to just hide this field when it is "No"?

For the former set the criteria of your report's query so it only includes the
"Yes" rows by using True as the criteria for that column.

For the latter just use a TextBox for your field on the report with a
ControlSource of...

IIf([FieldName]=0, "", "Yes")
 
D

Duane Hookom

I think Rick meant a control source of:
=IIf([FieldName]=0, "", "Yes")

He also wanted to remind you to make sure the name of the control is not the
name of a field.

--
Duane Hookom
MS Access MVP

Rick Brandt said:
Althekid said:
Thank you for your prompt reply.
Forgive me for being a bit dim! but could you please guide me as to
where i need to enter this code?

To clarify... Do you want records with the value "No" to be filtered out
or do you want to just hide this field when it is "No"?

For the former set the criteria of your report's query so it only includes
the "Yes" rows by using True as the criteria for that column.

For the latter just use a TextBox for your field on the report with a
ControlSource of...

IIf([FieldName]=0, "", "Yes")
 

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