Question: How do I get the Y/N checkbox fields to display a set sentence of text in a report? Or better yet, into another field such as a memo field?
Super noob here. On a scale of 1-10 being how much I'll understand your response, I'll probably be between 2-6 depending on how complicated your answer is. With 6 meaning I will probably still have trouble understanding answer even if very basic. But I'll appreciate your time and answer and be better off than where I am now.
Example: On the form there is a paragraph with a checkbox next to it. Read likes the paragraph and selects it. I generate a report at the end of the month to send to another user (I'm the middle man). I want the report to have the text, not Y or N or 1, -1, etc.
Background: My database has a table with several Y/N checkbox fields. This is so that a user can just check which options he wants via the form. As an example those columns are labeled as: Column1, Column1a, Column1b, Column2, Column2a, Column2b and so on. In design view the descriptions currently contain what each Y/N column represents. For example: Column1 description: Location and type. Column1a is a sub-selection under Column1 and has the description: Confirm Location of whatever.... Column1b description reads: Confirm type of whatever...
When the user selects these Y/N options they are essentially saying that they are wanting an answer to confirm the location and type of whatever. Why the box? Because the questions that can be asked are standardized but rather long. They are attached to a justification for the work that needs to be done. There is a memo field for freetext for additional explanation of the users question.
Now, I have to send a report to the person who is going to do the work to answer the question. Obviously he does not want a sheet with a bunch of Y/Ns on it. I need the report to display those text descriptions. How do I accomplish this?
I would like to generate a text paragraph from the Y/N checkbox descriptions and populate that into the memo field along with their free text if possible.
I'd use an IIf() construct.
IE. In the report, or whatever you're creating, there would be text data in a TextBox control. The .RecordSource should be set similar to this : -
='Some standard blurb' &
-
IIf([Column1],'Column1 question included',Null) &
-
'Other standard blurb' &
-
IIf([Column1a],'Column1a question included',Null) &
-
'.'
I've spread these over multiple lines for easier viewing but you wouldn't do that in your version. [Column1] & [Column1a] refer to the checkbox, or boolean, data. This will probably be from data saved in a table rather than from the form so make your own references work.
5 1660 NeoPa 32,556
Expert Mod 16PB
I'd use an IIf() construct.
IE. In the report, or whatever you're creating, there would be text data in a TextBox control. The .RecordSource should be set similar to this : -
='Some standard blurb' &
-
IIf([Column1],'Column1 question included',Null) &
-
'Other standard blurb' &
-
IIf([Column1a],'Column1a question included',Null) &
-
'.'
I've spread these over multiple lines for easier viewing but you wouldn't do that in your version. [Column1] & [Column1a] refer to the checkbox, or boolean, data. This will probably be from data saved in a table rather than from the form so make your own references work.
Thank you. I'm at work and utilizing your answer; however, I get "Some standard Blurb" in the textbox on a practice report I created no matter whether Column1 is checked or not.
Here's my set up:
tbl_CategoryAirfields
Fields: Datatype: Description(text I need)
1LocationType Y/N Determine location & type of AF
1aConfirmLocation Y/N -Confirm location via gecoords
1bConfirmType Y/N -Confirm type (comm,mil,private)
Text Memo Freetext
I have more to this table and 19 other tables that are similar. The text stays pretty much the same except for the actual geographical item in question(table category name). For example the next table is:
tbl_CategoryPorts
Fields: Datatype: Description(text I need)
1LocationType Y/N Determine location & type of Port
1aConfirmLocation Y/N -Confirm location via gecoords
1bConfirmType Y/N -Confirm type(comm,mil,private)
Text Memo Freetext
These options are available through a subform which changes depending on the category selection on another table. "Above" these 19 category tables is a table that has a combobox: Select Geographical Survey Category with CategoryAirfields, CategoryPortFacilities, etc. Selecting Category Airfields would give you the subform related to the Airfields table and my checkboxes with the free text memo field.
In the end I need the description text. I only made checkboxes for easy use by the user. Dropdowns were too much; the freetext memo field is actually the 26th field in the table. I wish that all my yes's and no's would actually show up as text in the memo field like this:
To: Geographical Survey People
From: JDUSN1978
Request: Provide geographical survey of coastal land in Florida for potential private and commercial use Port Facility.
Location: SE Florida, east coast, between Miami and Fort Lauderdale.
Type: Up to commercial use.
Return Report Guidance:
Determine location and type of port facility.
- Confirm location via geo-coordinates DDMMSSN/S DDDMMSSE/W.
- Conform the potential type of port facility.
What is the current status of the are of the potential port facility?
- Is it occupied?
- Is the land clear or vegetated?
- IS any portion of the land currently under construction?
This return report guidance is the part I'm struggling with how to create. Getting the 1, 1a, 1b, 2, 2a, 2b etc to place formatted text, currently sitting in the description field, into the memo field or another place that works. If I could view it in a sub form next to the checkboxes and as you click they appear in a subform page that would be awesome. Then the user could change and/or add to what the checkboxes generate and save it as the memo in the table.
Thanks in advance for taking a look at this, I really appreciate it!
NeoPa 32,556
Expert Mod 16PB
You may be misinterpreting the code there. Only the stuff within the parentheses of the IIF() part is conditional. The other stuff is all constant and displays under all circumstances.
Let me know if that doesn't answer your problem and I'll see what else I can do for you.
Yep, I was over-complicating your reply. Got it to work in a query, not the actual Memo Field in the table. There I get error 3344 "does not recognize [1LoctionType].....". So I am thinking of using it in an Append Query to the memo field. Or to a textbox that can be manipulated further and saved to the memo field upon update. Any suggestions?
And the next step is to learn how to format these sentence returns with certain spaces between paragraphs.
Thank you!!
NeoPa 32,556
Expert Mod 16PB JDUSN1978:
Any suggestions?
I'm afraid not. I don't really understand what you're saying TBF. Anyway, if you have further questions then please ask them in separate threads. Linking to this one is perfectly acceptable, but focus on making what you want clearly understood. It's hard to help when you don't understand what's being requested.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: hans.bonefaas |
last post by:
Hi all,
I hope someone can help me with the following problem in ASP.net.
I want to edit the information for a record in a database (MS Access).
On the page I placed several textboxes and...
|
by: jason |
last post by:
hello. i am just trying to save a TextBox.Text value to a database, but
strangely, when the value is changed on the web form, the changes are
not recognized in the event where i try to save the...
|
by: Radek Budař |
last post by:
Hi all,
i have trouble with changing text value of textbox on runtime. I use this
control to display process information about sending e-mail per smtp. I use
external component
>>Imports...
|
by: Bhaskar Reddy |
last post by:
Hi,
I have a drop down as below.
<select id="drp1">
<option value="1">One</option>
<option value="2">Two</option>
</select>
|
by: Aussie Rules |
last post by:
Hi,
Within the code of a content page, how do you say set the .text value of a
label thats on the master page....
Thanks
|
by: Tuhin |
last post by:
please help me wit the code of passing hyperlink1.text value with navigateurl property of the hyperlink. cannot use session variable as cannot trap the value for non availability of the onClick()...
|
by: shank |
last post by:
I posted this in an HTML forum, but I think it's going to take some
scripting to act as I want to act.
I have a form with multiple records.
My intention is to have the user click a checkbox for...
|
by: Fary4u |
last post by:
Hi
is any body know where is actual problem is coz it's look me some problem ?
to insert value into the MS ACCESS DATABASE after the value is true form html
<input type="checkbox"...
|
by: Brad Pears |
last post by:
I have something strange going on - pretty sure it used to work before - and
now it does not...
Why does the following code not clear a combo box?
Me.cboLocation.Text = String.Empty
OR
...
|
by: Slaunger |
last post by:
Hi,
I am new here and relatively new to Python, so be gentle:
Is there a recommended generic implementation of __repr__ for objects
equal by value to assure that eval(repr(x)) == x independet...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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...
|
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,...
|
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,...
|
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...
|
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...
| |