If yes, enter this text

L

Linda \(RQ\)

Hi Everyone,

Using Access 2003. I have a yes/no field on my table. If patients are on
home meds it's yes if the meds are not home meds it's no. I created a query
for a report. On my report I want a field that only is visable if the
answer to the Home Meds field is yes and then I want it to show this text
"Home Meds".ight now it's a check box but I don't like the looks of it. I
thought I would be able to use the conditional formatting in my report but
it's not availabe when I select the check box. I'm not sure if this makes a
difference or not but 98% of the records are No. Where and how do I set
this up? In the rptqry or on my rpt? I would also like to know what I
would have searched for in the help file to get this answer. I have been
using the help files pretty successfully lately but it is hard to get an
answer when one doesn't know the question to ask and I couldn't figure this
one out.

Thanks,
Linda
 
L

Linda \(RQ\)

Ok..You guys help so much just by letting me ask the question! I looked for
just conditional in help and found conditional expressions so I changed
this...

=IIf([Confirmed] = "Yes", "Order Confirmed", "Order Not Confirmed")


To this....
=IIf([ThpyHomeMeds]="-1","Home Meds","")

It is working like I want it to on my report. I created an unbound control
and pasted the expression in there. Is this the correct way to handle this?

Thanks,
Linda
 
J

John Spencer

Your way is one "correct" way.

Another way in a report is to use a textbox bound to the field and use the
format property of the textbox control to show the result. Yes/No fields
actually have the value 0 (zero) for false and -1 for true.

You can use that fact to set the format of the control in the report using
the format tab of the properties window

Format: "Home Meds" ;"Home Meds";""

That says if the value is Positive or Negative then show Home Meds, if the
value is zero show a blank.

OR you could set the value in the query using an IIF statement. OR ...
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Linda (RQ) said:
Ok..You guys help so much just by letting me ask the question! I looked
for just conditional in help and found conditional expressions so I
changed this...

=IIf([Confirmed] = "Yes", "Order Confirmed", "Order Not Confirmed")


To this....
=IIf([ThpyHomeMeds]="-1","Home Meds","")

It is working like I want it to on my report. I created an unbound
control and pasted the expression in there. Is this the correct way to
handle this?

Thanks,
Linda


Linda (RQ) said:
Hi Everyone,

Using Access 2003. I have a yes/no field on my table. If patients are
on home meds it's yes if the meds are not home meds it's no. I created a
query for a report. On my report I want a field that only is visable if
the answer to the Home Meds field is yes and then I want it to show this
text "Home Meds".ight now it's a check box but I don't like the looks of
it. I thought I would be able to use the conditional formatting in my
report but it's not availabe when I select the check box. I'm not sure
if this makes a difference or not but 98% of the records are No. Where
and how do I set this up? In the rptqry or on my rpt? I would also like
to know what I would have searched for in the help file to get this
answer. I have been using the help files pretty successfully lately but
it is hard to get an answer when one doesn't know the question to ask and
I couldn't figure this one out.

Thanks,
Linda
 
L

Linda \(RQ\)

Wow, then I really am a Jedi.

Thanks!
Linda

John Spencer said:
Your way is one "correct" way.

Another way in a report is to use a textbox bound to the field and use the
format property of the textbox control to show the result. Yes/No fields
actually have the value 0 (zero) for false and -1 for true.

You can use that fact to set the format of the control in the report using
the format tab of the properties window

Format: "Home Meds" ;"Home Meds";""

That says if the value is Positive or Negative then show Home Meds, if
the value is zero show a blank.

OR you could set the value in the query using an IIF statement. OR ...
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

Linda (RQ) said:
Ok..You guys help so much just by letting me ask the question! I looked
for just conditional in help and found conditional expressions so I
changed this...

=IIf([Confirmed] = "Yes", "Order Confirmed", "Order Not Confirmed")


To this....
=IIf([ThpyHomeMeds]="-1","Home Meds","")

It is working like I want it to on my report. I created an unbound
control and pasted the expression in there. Is this the correct way to
handle this?

Thanks,
Linda


Linda (RQ) said:
Hi Everyone,

Using Access 2003. I have a yes/no field on my table. If patients are
on home meds it's yes if the meds are not home meds it's no. I created
a query for a report. On my report I want a field that only is visable
if the answer to the Home Meds field is yes and then I want it to show
this text "Home Meds".ight now it's a check box but I don't like the
looks of it. I thought I would be able to use the conditional
formatting in my report but it's not availabe when I select the check
box. I'm not sure if this makes a difference or not but 98% of the
records are No. Where and how do I set this up? In the rptqry or on my
rpt? I would also like to know what I would have searched for in the
help file to get this answer. I have been using the help files pretty
successfully lately but it is hard to get an answer when one doesn't
know the question to ask and I couldn't figure this one out.

Thanks,
Linda
 

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