Displaying Yes fields but not NO

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
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
 
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")
 
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")
 
Back
Top