473,769 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

When Checkbox is Checked on Form, want report to print Yes/No

3 New Member
I was assigned the task of creating a small database by my office.
I created a table with the appropriate field ID, Project, and Approve (checkbox). Then I created a Form of the table.

But when I run my reports I see the actual check boxes. I am trying to understand what I am doing wrong.

What I would like to happen is when a person clicks the approve check box it says yes on the report, and when the check box is not checked it should say no.

Any help would be greatly appreciated.
Dec 18 '08 #1
6 2284
MMcCarthy
14,534 Recognized Expert Moderator MVP
On the report make the check box control invisible but don't delete it. Assuming check box is called "Check1" then do the following.

Add a new text box control to the report and place it where you want the "Yes" to display. Set the control source of the new check box to the following.

Expand|Select|Wrap|Line Numbers
  1. =IIf([Check1]=-1,"Yes","No")
  2.  
Dec 18 '08 #2
jinfo
3 New Member
It worked thank you, I have a question im new to programming what does the IIF mean?
Dec 18 '08 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
IIf(<expression >,If True, If False)

It is essentially an IF statement. Essentially it says if whatever expression you use before the first comma is true then use value between first and second comma otherwise use value after second comma.

You can use any expression before the first comma in the form of ...

Expand|Select|Wrap|Line Numbers
  1. [Field Name]="xxx" (for a string)
  2. [Field Name] Like "Bl*" (when you want all strings beginning with Bl)
  3. [Field Name]=2 (For a number)
  4. [Field Name]>2 (For all numbers higher than 2)
  5. [Field Name]<2 (For all numbers lower than 2)
  6. [Field Name]=#22/10/2008# (For a date)
  7.  
Dec 19 '08 #4
missinglinq
3,532 Recognized Expert Specialist
To continue Mary's explanation, IIF stands for Imediate IF. Essentially it's a shortcut for

Expand|Select|Wrap|Line Numbers
  1. If <whatever> Then
  2.   <Do this>
  3. Else
  4.   <Do something else>
  5. End If
Welcome to Bytes!

Linq ;0)>
Dec 19 '08 #5
jinfo
3 New Member
Thank You

I got it to work, but I must have misunderstood what I was suppose to do. The check box is fine but what they wanted was two check boxes. One that says "Yes" and another box next to it that say "No". Depending on which box you check the word should be written on the report.

I have to pics of my project so far. Can something like this be done?
Attached Images
File Type: jpg project.jpg (14.4 KB, 262 views)
File Type: jpg Project2.jpg (14.8 KB, 229 views)
Dec 19 '08 #6
NeoPa
32,573 Recognized Expert Moderator MVP
Radio Buttons are better for such, mutually exclusive, options. If Yes=True then No=False and If Yes=False then No=True.

An Option Group control will be required to contain the Radio Buttons.

On the report a TextBox with a value of something like :
Expand|Select|Wrap|Line Numbers
  1. =IIf(optGroup=1,"Yes","No")
Dec 23 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3504
by: John Mullen | last post by:
I want to take the following HTLM and use javascript to turn on radio buttons if checkbox is checked, can I do this with javascript (maybe onClick or an array) or do i need a server side script ? <li>ABACAVIR SULFATE</li> <INPUT NAME="ingredient0" TYPE=checkbox VALUE="ABACAVIR SULFATE"><br> <input name="ABACAVIR SULFATE AMOUNT" type="radio" value="EQ 300MG BASE">EQ 300MG BASE<br> <input name="ABACAVIR SULFATE AMOUNT" type="radio" value="EQ...
12
2977
by: zig | last post by:
I've posted this on alt.comp.lang.coldfusion, but is predominantly a javascript problem: I have a CF query which returns several rows of records. I wanted to have a checkbox on each record of that returned query which would allow the user to select which record to print if checked. As the checkboxes are generated within the CF, they all have tha same name. With the help of a fellow a.c.l.c. member, we've got the script to a point...
3
2794
by: Rich | last post by:
I have a form with 2 check boxes. One of the check boxes is used to specify that the user is a "primary contact." When I check the primary contact box I want a second box for "standard contact" to be checked as all primary contacts must be standard contacts. If I uncheck the primary contact no change in status of the standard contact is needed. I am assuming I can use some onclick function but I tried using a onclick on the one box to...
4
26978
by: Piotr | last post by:
how can I read (in alert for example) array index number of checked checkbox? I have: <input type="checkbox" id="id_number" name="check" value="1" onclick="show()"/> <input type="checkbox" id="id_number" name="check" value="2" onclick="show()"/> <input type="checkbox" id="id_number" name="check" value="3"
6
1951
by: Megan | last post by:
Hi everybody- I'm trying to use a checkbox to control whether or not a date field in a query "Is Null" or "Is Not Null." I have 2 date fields: InDate and OutDate. If there is an OutDate, then the record is finished. If there is no OutDate, then the record is not finished. I'm using an unbound form (frmStatus) to enter data into a query to
2
9208
by: /.. | last post by:
Hi all, I'm working on a report display page that currently uses 5 checkboxlists with a total of 86 items to display values from 5 different tables in an Access database. The page works fine now. On presenting it to the users they pointed out that their users could change the values in the checkboxes and then print them out, ultimately documenting false information.
1
4511
by: dx | last post by:
I'm extremely frustrated with ASP.NET...again! To me this should be as simple as setting oCheckBox.Checked = True.. yet for some reason it isn't. I have a user control (ascx) that that has a checkbox and I can't get it to default to checked. I tried radiobuttons and experienced the same result.. can't start them as checked. The really frustrating thing is that I set the attributes of other input controls in the Init() with no problem. ...
34
3832
by: clinttoris | last post by:
Hello Experts, I have been told to post this in the Javascript forum as I want to do this client side just before my form gets submitted. Once the user clicks the submit button a javascript function needs to run and validate all the checkboxes on my form and make sure none of them are unchecked. I suck at Javascript and my problem is 2fold. I have the following code that constructs the checkbox response.write "<input type=checkbox...
4
13689
by: sara | last post by:
Hi - I've looked at many posts, and cannot find the answer on this specific problem. I have several fields on a table, which I've defined as "Text", 3 characters, Format Yes/No (I picked up the Text and Format Yes/No from a Posting). I have a form with a label and a check box for each item and the user checks off the ones s/he wants to be "Yes".
0
4101
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me with my problems. Now for my new little problem,I had a problem posting the values from checkbox fields to a database and thats the obstacle I overcame. Now the second part is my new problem is that I want that the next time that page loads for...
0
10222
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10050
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9866
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.