Making checkbox size bigger in MS Access - ms-access

I am trying to increase the size of checkbox in MS Access and I know that the default checkbox size cannot be increased.
However, I tried to achieve this by creating an input box and following what is listed here:
http://allenbrowne.com/ser-52.html
I am confused about this step:
Hold down the Alt key, and type 0168 on the numeric keypad (the character for False)
Holding alt key and typing that does not give me a "X" in report view. It gives a very small question mark.
Can I no longer use the method described in the blog above to create a bigger checkbox?

Technique from that blog is simply setting format on a numeric value where character shown depends on whether number is positive or negative. First position is for positive number and second position is for negative. Since True is -1 in a Yes/No field, second position character will be displayed.
If Alt+ is too difficult or other symbols are preferred, another way to get special characters is to copy/paste from Windows Character Map utility.
Instead of using Wingdings font to display symbols, can show alpha characters by setting Format property of textbox with:
To show Y or N: \N;\Y
To show X or nothing: ;\X
Same result can be achieved with an IIf() conditional expression in textbox ControlSource or query calculated field. Difference is the calculated result is the alpha character whereas setting format property does not alter what is actually in the field/textbox.

Related

Using the Can Shrink option for Currency

I am creating a report in Microsoft Access 2019.
Using the code: =IIf(Trim(Nz([TextBox],""))="","","TextBox"), I have been able to use the can shrink option to save space, and make the report easier to read. Using this and similar codes, I have been able to shrink text boxes, dates, and check boxes.
I am having trouble with currency though. Since the currency boxes are already filled as $0.00, I can't use the code above.
When I tried these two codes: =IIf(Trim(Nz([Base Cost],"$0.00"))="","","Base Cost") or =IIf(Trim(Nz([Base Cost],""))="$0.00","","Base Cost") I got an error saying "The control has a reference to itself"
Along the same lines, how would I code the unbound box label for the Currency if I want it to shrink.
In Essence: I have two boxes: Base Cost and $0.00. I'm having trouble figuring out an If/Then statement for the currency to display ONLY if it has value greater than 0. Then how would I code the Base Cost label to display ONLY if the currency if greater than 0.
Thanks.
I got an error saying "The control has a reference to itself"
warns you, that the control (textbox) has the same name as the bound field (if you use add existing fields, they are named equal) what only is valid, if control is directly bound to the field.
You should always rename those controls, to prevent side-effects (like the circular-reference).
Empty controls can be made invible, instead of shrinking. To format by condition, use conditional.formatting (no visible property, but setting background and textcolor to to forms color hides too).
To check for= ""as condition only catches empty fields. Check the unformated value!
Trim(Nz([Base Cost],""))="$0.00"
can't get true, as[Base Cost]is empty or 0. It just displays $0.00, because of formatting!
Nz([Base Cost],0)) > 0
Sets[Base Cost]to zero if empty and then compares if greater zero.

access 2016 calculated fields round to zero

I am trying to include a simple density calculation in access 2016, but the form returns a value of 0 if the input dimensions (mass or sphere diameter) are < 0.5. The field works fine for larger dimensions, so I assume that the smaller values are getting rounded to 0 somewhere along the way, but I can't figure out where.
For the inputs in my table, I have Field Names "green mass", "green pole", and "green equator" where the data type for each is set to "number," the Field Size is set to "single" (vs. double or decimal), and the Decimal Places is set to 4 digits
The resulting density is displayed in the Field "apparent green density" where the data type is set to "calculated," the Result Type is set to "single" and the Decimal Places is set to 4 digits.
After looking at various access forums and websites, I'm pretty sure I want to use single or double as my field size, but I've also tried decimal and byte and integer I keep getting 0.
Can anyone explain why this isn't working?
The equation is below. It's a bit complicated because it's a 3-part If statement (if dimensions for a sphere are given, caclulate density of a sphere, if dimensions of a disc are give, calculate density of a disc, if dimensions of a cube...) All three cases work for large dimensions (>0.5), but all 3 result in 0 for dimensions <0.5.
IIf([GreenPole],[GreenMass]/(3.14159265359/6*2.54^3*(([GreenPole]+[GreenEquator])/2)^3),IIf([GreenDia],([GreenMass]/(3.14159265359*([GreenDia]/2)^2*[GreenHeight]*2.54^3)),IIf([GreenLength],[GreenMass]/([GreenLength]*[GreenWidth]*[GreenThickness]*2.54^3),0)))
The first part of the equation for density of a sphere, is:
`IIf([GreenPole],[GreenMass]/(3.14159265359/6*2.54^3*(([GreenPole]+[GreenEquator])/2)^3),0)
Oliver Jacot-Descombes got me started in the right direction. I don't have much experience at all with coding, but I think what happened is that field identified in my IIf statement is somehow transformed into a boolean or yes/ no field and anything less than 0.5 is rounded to a no and the result of the truepart is then 0.
I modified the code to:
IIf([GreenPole]>0,[GreenMass]/(3.14159265359/6*2.54^3*(([GreenPole]+[GreenEquator])/2)^3),0)
And everything works now. (I also modified the second and third IIf statments to IIf([GreenLength]>0 and IIF([GreenDia]>0..)

Access 2007: Conditional Formatting not working for control based on lookup value

I have an Access 2007 report with a control based on a lookup field which has a list of values. The field values are strings:
0. Late
1. Critical
2. Urgent
3. Normal
4. Low
5. Closed
6. Draft/On Hold
In the conditional formatting box, I use:
Field Value Is equal to "0) Late"
and choose a different color background and text color. This should conditionally change the background and text color of the textbox when it's value matches "0) Late", however instead of showing up as expected, the report simply doesn't print that value.
Access help says "When you apply conditional formatting to a lookup field, the condition must be based on the lookup ID, not the value returned by the lookup field."
I'm not sure what it means by Lookup ID. Is that a number based on the position in the lookup value list? I've tried using 1 instead of 0) Late, but that doesn't work either.
The fields in the report were set with background "Transparent"; the backgrounds needed to be set to "Normal" for the fill colors to show up.

How to filter an SSRS Dataset to return single record to be used in Textbox properties

I'm a total newbie when it comes to SSRS, so please excuse any use of wrong terminology. But I have been given a task to create a report that will have have a dataset that will contain records that will be used to set Textbox's font size and weight, underlined, justification, and text values. Something like this...
Size Bold Underlined Text Identifier
10 Y N My Title Title
10 N N Some Def Def1
Sorry about the misalignment in spacing. Not sure how to do a table here. But basically, I'm wondering if there is a way to write an expression that would allow me to get the record with the Identifier of "Title" and use the other fields in the textbox properties. Something like the where clause of Inline Linq. But I'm at a total lose and would greatly appreciate some help on this. Thanks again.
You should be able to do this. In the TextBox properties, select the FontSize property and click on <Expression..>. Then in the expression box, pick the correct Dataset and field which will contain the font size.
Then repeat this process for the other attributes.

Microsoft Access: Long Text field truncated in report! How to fix this?

I created a simple report in Access. One line per record (using the default tabular format with Report Wizard). However, one text field is sometimes too long and is truncated when one record is displayed on only one line.
How do I tell Access that when the text field is too long, display it (and the record) in more than one line as needed so that the complete text is shown? Thanks.
More info: I tried to increase the height of the text field, but then every record in the report had its height increased whether needed or not. This wasn't what I wanted.
Set the CanGrow property of the text field to True.
This will increase the field height only in the lines where it's really necessary.
Quoted from MS Office Support Documentation [Refer the part Change the field size of a text field]
Right-click the table that contains the field that you want to
change, and then click Design View.
In the table design grid, select the field for which you want to
change the field size.
In the Field Properties pane, on the General tab, enter the new
field size in the Field Size property. You can enter a value from 1
to 255. This number specifies the maximum number of characters that
each value can have. For larger text fields, use the Memo data type.