473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Showing a field in a form on a report if it's checked

Hey All,

I have a report that I would like to show a word on based on if a
field is checked in a form. For example. The form has a check box
called Fee. If that is checked, I want the word Paid to show up in the
report. If it's not checked, then I want it to not show.

Thanks for any help!
Nov 20 '07 #1
11 1829
On Tue, 20 Nov 2007 13:13:40 -0800 (PST), radink wrote:
Hey All,

I have a report that I would like to show a word on based on if a
field is checked in a form. For example. The form has a check box
called Fee. If that is checked, I want the word Paid to show up in the
report. If it's not checked, then I want it to not show.

Thanks for any help!
Is the field [Fee] included in the report's record source?
If so, then add an unbound text control to the report.
Set it's control source to:
=IIf([Fee] = True,"Paid","")

If the check box on the form is NOT included in the report's record
source, then add an unbound control to the report.
Set it's control source to:
=IIf(forms!FormName!Fee = True, "Paid","")

The form must be open when the report is run.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Nov 20 '07 #2
On Nov 20, 4:35 pm, fredg <fgutk...@example.invalidwrote:
On Tue, 20 Nov 2007 13:13:40 -0800 (PST), radink wrote:
Hey All,
I have a report that I would like to show a word on based on if a
field is checked in a form. For example. The form has a check box
called Fee. If that is checked, I want the word Paid to show up in the
report. If it's not checked, then I want it to not show.
Thanks for any help!

Is the field [Fee] included in the report's record source?
If so, then add an unbound text control to the report.
Set it's control source to:
=IIf([Fee] = True,"Paid","")

If the check box on the form is NOT included in the report's record
source, then add an unbound control to the report.
Set it's control source to:
=IIf(forms!FormName!Fee = True, "Paid","")

The form must be open when the report is run.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
I did option 2, since it's not linked. It works but doesn't. If it's
set to true it doesn't show on any of them, if I set it to false it
shows it on all of them. I do have the form open when Im running it.

Thanks!
Nov 20 '07 #3
On Nov 20, 2:56 pm, radink <radi...@gmail.comwrote:
On Nov 20, 4:35 pm, fredg <fgutk...@example.invalidwrote:


On Tue, 20 Nov 2007 13:13:40 -0800 (PST), radink wrote:
Hey All,
I have a report that I would like to show a word on based on if a
field is checked in a form. For example. The form has a check box
called Fee. If that is checked, I want the word Paid to show up in the
report. If it's not checked, then I want it to not show.
Thanks for any help!
Is the field [Fee] included in the report's record source?
If so, then add an unbound text control to the report.
Set it's control source to:
=IIf([Fee] = True,"Paid","")
If the check box on the form is NOT included in the report's record
source, then add an unbound control to the report.
Set it's control source to:
=IIf(forms!FormName!Fee = True, "Paid","")
The form must be open when the report is run.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

I did option 2, since it's not linked. It works but doesn't. If it's
set to true it doesn't show on any of them, if I set it to false it
shows it on all of them. I do have the form open when Im running it.

Thanks!- Hide quoted text -

- Show quoted text -
Since [Fee] is already True or False, omit the =True part in your IIF:
=IIf([Fee],"Paid","")

I've sometimes seen goofiness when using what evaluates to 'IF true =
true'.

HTH,
Jana
Nov 20 '07 #4
On Nov 20, 2:56 pm, radink <radi...@gmail.comwrote:
On Nov 20, 4:35 pm, fredg <fgutk...@example.invalidwrote:


On Tue, 20 Nov 2007 13:13:40 -0800 (PST), radink wrote:
Hey All,
I have a report that I would like to show a word on based on if a
field is checked in a form. For example. The form has a check box
called Fee. If that is checked, I want the word Paid to show up in the
report. If it's not checked, then I want it to not show.
Thanks for any help!
Is the field [Fee] included in the report's record source?
If so, then add an unbound text control to the report.
Set it's control source to:
=IIf([Fee] = True,"Paid","")
If the check box on the form is NOT included in the report's record
source, then add an unbound control to the report.
Set it's control source to:
=IIf(forms!FormName!Fee = True, "Paid","")
The form must be open when the report is run.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

I did option 2, since it's not linked. It works but doesn't. If it's
set to true it doesn't show on any of them, if I set it to false it
shows it on all of them. I do have the form open when Im running it.

Thanks!- Hide quoted text -

- Show quoted text -
correction, I did option 1, not 2, but everything still applies:
=IIf(forms!FormName!Fee, "Paid","")

Jana
Nov 20 '07 #5
"radink" <ra*****@gmail.comwrote
I did option 2, since it's not linked. It works but
doesn't. If it's set to true it doesn't show on any
of them, if I set it to false it shows it on all of
them. I do have the form open when Im running it.
Care to clarify "on any of them" and "on all of them"... any of them _whats_
and all of them _whats_ and just how is the field on the form related to
which of "them whats"?

I could guess that "them whats" are "records" displayed in the report, but
you need to confirm that, and explain how the report is supposed to
determine just which "them what" the value is supposed to apply.

Larry Linson
Microsoft Access MVP
Nov 21 '07 #6
On Nov 21, 12:25 am, "Larry Linson" <boun...@localhost.notwrote:
"radink" <radi...@gmail.comwrote
I did option 2, since it's not linked. It works but
doesn't. If it's set to true it doesn't show on any
of them, if I set it to false it shows it on all of
them. I do have the form open when Im running it.

Care to clarify "on any of them" and "on all of them"... any of them _whats_
and all of them _whats_ and just how is the field on the form related to
which of "them whats"?

I could guess that "them whats" are "records" displayed in the report, but
you need to confirm that, and explain how the report is supposed to
determine just which "them what" the value is supposed to apply.

Larry Linson
Microsoft Access MVP
Larry,

Sorry about that. All of them means all of the records that show up in
the report. The report shows about 3 lines from each record based on
the query of the report. When I was using the code above, That Paid
would show up on all of the sections or none at all, when it should
have been only some of them.
Thanks
Nov 21 '07 #7
On Nov 20, 5:36 pm, Jana <Bauer.J...@gmail.comwrote:
On Nov 20, 2:56 pm, radink <radi...@gmail.comwrote:
On Nov 20, 4:35 pm, fredg <fgutk...@example.invalidwrote:
On Tue, 20 Nov 2007 13:13:40 -0800 (PST), radink wrote:
Hey All,
I have a report that I would like to show a word on based on if a
field is checked in a form. For example. The form has a check box
called Fee. If that is checked, I want the word Paid to show up in the
report. If it's not checked, then I want it to not show.
Thanks for any help!
Is the field [Fee] included in the report's record source?
If so, then add an unbound text control to the report.
Set it's control source to:
=IIf([Fee] = True,"Paid","")
If the check box on the form is NOT included in the report's record
source, then add an unbound control to the report.
Set it's control source to:
=IIf(forms!FormName!Fee = True, "Paid","")
The form must be open when the report is run.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
I did option 2, since it's not linked. It works but doesn't. If it's
set to true it doesn't show on any of them, if I set it to false it
shows it on all of them. I do have the form open when Im running it.
Thanks!- Hide quoted text -
- Show quoted text -

correction, I did option 1, not 2, but everything still applies:
=IIf(forms!FormName!Fee, "Paid","")

Jana
Jana,

These did not work either. Im using it on a text box.. should i use
seomthing else?
Nov 21 '07 #8
On Nov 20, 5:36 pm, Jana <Bauer.J...@gmail.comwrote:
On Nov 20, 2:56 pm, radink <radi...@gmail.comwrote:
On Nov 20, 4:35 pm, fredg <fgutk...@example.invalidwrote:
On Tue, 20 Nov 2007 13:13:40 -0800 (PST), radink wrote:
Hey All,
I have a report that I would like to show a word on based on if a
field is checked in a form. For example. The form has a check box
called Fee. If that is checked, I want the word Paid to show up in the
report. If it's not checked, then I want it to not show.
Thanks for any help!
Is the field [Fee] included in the report's record source?
If so, then add an unbound text control to the report.
Set it's control source to:
=IIf([Fee] = True,"Paid","")
If the check box on the form is NOT included in the report's record
source, then add an unbound control to the report.
Set it's control source to:
=IIf(forms!FormName!Fee = True, "Paid","")
The form must be open when the report is run.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
I did option 2, since it's not linked. It works but doesn't. If it's
set to true it doesn't show on any of them, if I set it to false it
shows it on all of them. I do have the form open when Im running it.
Thanks!- Hide quoted text -
- Show quoted text -

correction, I did option 1, not 2, but everything still applies:
=IIf(forms!FormName!Fee, "Paid","")

Jana
I also tried something else. It seems like in the part "Paid","") it's
using nothing. If I add something in the second set of "" it puts that
in all of the records on the report. So it's not working correctly.
Nov 21 '07 #9
On Wed, 21 Nov 2007 06:22:47 -0800 (PST), radink <ra*****@gmail.com>
wrote:
>On Nov 20, 5:36 pm, Jana <Bauer.J...@gmail.comwrote:
>On Nov 20, 2:56 pm, radink <radi...@gmail.comwrote:
On Nov 20, 4:35 pm, fredg <fgutk...@example.invalidwrote:
On Tue, 20 Nov 2007 13:13:40 -0800 (PST), radink wrote:
Hey All,
I have a report that I would like to show a word on based on if a
field is checked in a form. For example. The form has a check box
called Fee. If that is checked, I want the word Paid to show up in the
report. If it's not checked, then I want it to not show.
Thanks for any help!
Is the field [Fee] included in the report's record source?
If so, then add an unbound text control to the report.
Set it's control source to:
=IIf([Fee] = True,"Paid","")
If the check box on the form is NOT included in the report's record
source, then add an unbound control to the report.
Set it's control source to:
=IIf(forms!FormName!Fee = True, "Paid","")
The form must be open when the report is run.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
I did option 2, since it's not linked. It works but doesn't. If it's
set to true it doesn't show on any of them, if I set it to false it
shows it on all of them. I do have the form open when Im running it.
Thanks!- Hide quoted text -
- Show quoted text -

correction, I did option 1, not 2, but everything still applies:
=IIf(forms!FormName!Fee, "Paid","")

Jana

Jana,

These did not work either. Im using it on a text box.. should i use
seomthing else?
A text box should work just fine. You need to let the report know
which records should show as "Paid" and which ones not. The easiest
way is probably to include "Fee" as a field in the query that is the
RecordSource for the report. Then the code that several people have
supplied (Iif([Fee], "Paid", "") will work.
Nov 21 '07 #10
Hi -

On the form that calls the report, is the check box "Fee" bound to a field in
the underlying recordset? If it's not, then what does it refer to?
Presumably each item is either paid or it isn't, so the Fee data has to be
included in the data for each record, and then made a part of the query for
the report as well.

If the Fee checkbox *is* bound to a data field, then the problem is that the
report is referring to whatever record is on the form at the time the report
is run, and that is the same one for each record the report prints.

HTH

John
radink wrote:
> I did option 2, since it's not linked. It works but
doesn't. If it's set to true it doesn't show on any
[quoted text clipped - 11 lines]
> Larry Linson
Microsoft Access MVP

Larry,

Sorry about that. All of them means all of the records that show up in
the report. The report shows about 3 lines from each record based on
the query of the report. When I was using the code above, That Paid
would show up on all of the sections or none at all, when it should
have been only some of them.
Thanks
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200711/1

Nov 21 '07 #11
On Nov 21, 7:18 am, radink <radi...@gmail.comwrote:
On Nov 21, 12:25 am, "Larry Linson" <boun...@localhost.notwrote:


"radink" <radi...@gmail.comwrote
I did option 2, since it's not linked. It works but
doesn't. If it's set to true it doesn't show on any
of them, if I set it to false it shows it on all of
them. I do have the form open when Im running it.
Care to clarify "on any of them" and "on all of them"... any of them _whats_
and all of them _whats_ and just how is the field on the form related to
which of "them whats"?
I could guess that "them whats" are "records" displayed in the report, but
you need to confirm that, and explain how the report is supposed to
determine just which "them what" the value is supposed to apply.
Larry Linson
Microsoft Access MVP

Larry,

Sorry about that. All of them means all of the records that show up in
the report. The report shows about 3 lines from each record based on
the query of the report. When I was using the code above, That Paid
would show up on all of the sections or none at all, when it should
have been only some of them.
Thanks- Hide quoted text -

- Show quoted text -
So, your Fee field on your form is a bound field, not an unbound
checkmark? Each record contains a Fee checkbox? If that is the case,
you need to include this in your query so it will check on each record
and make a decision of whether or not to put the word "Paid". What's
happening is your report is looking to the current record on the
form. If the record you happen to be on when you open the report has
Fee checked, then it's showing the word Paid on every record. If not,
then you get nothing for each record.

Add a calculated field to your query like this (Paste this into a
blank column in your query):

IsPaid: IIF([Fee],"Paid","")

Then add the IsPaid field to your report next to the details of each
record.

HTH,
Jana
Nov 21 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jack | last post by:
Hi, I have a asp input form of a financial report. Here most of the fields are text boxes where the user need to input the values corresponding to an item. However, there are few items which are...
3
by: RC | last post by:
I can't quite grasp the concept of creating custom reports depending upon what options a user picks on a Form. For example, the user clicks on a "Print Reports" button and a Form pops up. On the...
4
by: Zenon | last post by:
I am attempting to append a string prefix to a report field which is based on a query result. I want the user to be able click a checkbox on the form which opens the report to determine whether...
2
by: Jeff | last post by:
Damn this is frustrating. I have used subreports for years and never had this problem. I have used these things more times than I can remember. Never have I had this problem....
2
by: Incolor | last post by:
Hello All! I have to generate a checklist form as an input form in Access. A paper form is taken out in the field and checked yes, no, OR n/a for each item inspected. The problem I am having is...
1
by: Curtis | last post by:
I am having a problem with the coding below that someone was trying to help me with in another website. I have been to several websites and hopefully here I can get it resolved. I inherited this...
2
by: john | last post by:
My report is based on a query with user input . In my report I have a text box with the following code: =. This works when the query outcome is 1 or more records. But when the query output is zero...
2
by: Robert McEuen | last post by:
Access 97/2003 Windows XP (Classic Start Menu) I just converted an mdb from A97 to A2K3 and found something that, after Google search, doesn't appear to have been addressed in cdma... I have...
1
by: gandhi.vishal | last post by:
Hello, I have an issue. I'm not seeing the reportviewer data at all. The column names come up fine but there is no data in the report table. Here is what I'm doing I created a dataset with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.