MS-Access form, want text to wrap without truncation (as in reports) - ms-access-2007

I have a form that shows a list. One of the fields is of type text, with max. length of 255. This field appears truncated on the form. The Can Grow property is set to 'Yes'.
I want the height to be dynamically adjusted in each row based on the number of characters in the current filed. This happens in reports but not in form fields in this case.
I tried to compare the properties in the form with the report but could not spot a difference.
How can I do that please? Thx.

No chance (scnr), This property doesn't work in form view, only if the form is printed.
TextBox.CanGrow Property
This property affects the display of form sections and controls only when the form is printed or previewed, not when the form is displayed in Form view, Datasheet view, or Design view.
Edit
You can take a look at http://lebans.com/cangrow.htm
Stephen Lebans is an API wizard, you will find lots of complicated code in there, but it may do what you want. But you'll have to decide if it's worth the additional code and potential instabilities.

Related

Can Access ensure a new form record displays all fields?

I have a database where I don't want some fields showing depending on data in other fields. I'm still new to VBA, having learnt how to do things I need via the internet (there's not much call for it in my job so like to try it out on side projects) for the things I need and have managed to create some code that hides certain fields that aren't needed, depending on what's been entered in another field and that works okay, if not perfectly (I'd like it to only work on the current record and not all of them at once but will worry about that later). My problem is, if I'm entering information onto a record and any of those fields become invisible exactly as I would want them to, then if I have more records to complete and load a new record, those hidden fields are also hidden on the blank record before any data has been entered and I want each new record to show all fields from the outset.
Another thing I've noticed is that if I close the database, next time I go into it the hidden fields have unhidden themselves again so I know I'm missing something important.
Here's a screenshot of a bit of the code where I want 2 other fields (What_reason and Date_sent_to_new_owning_School) to be visible depending on whether the answer in the current field after update is "Standard" or "Non-standard":
I'm sorry if this is really entry-level stuff but I AM entry level and trying to learn. This bit does work, albeit not perfectly as I'd like it to only work on the record I'm in at the time, and not go through and hide that field in all the other records at once (which it's doing).
I've searched everywhere but can't find the answer and although I've tried, I'm nowhere near good enough at VBA to try and use common sense to work it out. Is this something that can be done? I'm okay with computers generally and with Access too but I'm aware there's an awful lot I don't know and this is why I'm trying to do new things and learn stuff that I've not used before. I have tried all day to get this to work but am admitting defeat and am hoping somebody here will be able to help me. I'll probably need 'idiot level' advice if that's possible, I know my limitations. :)
Do you know how to use the Event tab in the Property Sheet? You can set all of your fields to [field].Visible = True on either: On Current, On Load, or On Open
Screenshot of the Property Sheet and for the field that determines the visibility of all of the other fields; you can use the Event: After Update so that way when you click/tab away from that field, it'll make those changes for you!
Property setting affects ALL instances of control. Control will be visible/not visible for all records depending on conditions of current record. Therefore, dynamically hiding controls on form set in Continuous or Datasheet will NOT give the desired result of
only work on the current record and not all of them at once
Db is not going to 'remember' dynamic setting - code needs to be executed when form opens and/or navigating records - so it is needed in OnCurrent event as well as control's AfterUpdate.
Conditional Formatting can dynamically enable/disable textbox/combobox by record although control is still visible.

Checkboxes to generate letter

I am currently building a User form for some letters we use at work and I would like to design the userform to generate the letter with mostly just checkboxes. e.g.
Your application cannot be completed until the following is received:
A Statutory declaration providing a statement in regards to your: financial situation
In the above example I would need two checkboxes.
Checkbox 1:
A statutory declaration providing a statement in regards to your:
Checkbox2:
financial situation
I guess the question I am asking is in two parts:
1: How do I get checkboxes to generate text?
2: How do I get multiple checkboxes to generate text against the same bookmark/s?
I may not need a Statutory Declaration, I may need a "certified copy of:" ---"bank details, proof of identity, proof of citizenship"
As you can tell from the user form it's pretty extensive and all the checkboxes in the lower half of the form need to generate text.
Grateful for any advice or direction or resources or anything.
In theory, you might store the text to be inserted in your letter in the Check box's caption property and use code to insert the text into your letter when the box is checked. I think this is cumbersome and recommend that you use the caption for a caption, for example, "Statutory declaration". If it is checked such a paragraph is inserted into the letter, else it is left out.
The required declaration may include one or several of many items. Since you are thinking of check boxes, you could have one for each "bank details", "proof of identity", "proof of citizenship". These selections are very short and could be placed in the caption property. But if the texts are longer or of greatly varying lengths I would recommend the use of text boxes instead. So, if Cbx1 is clicked, the text of Tbx1 is inserted etc.
Alternatively, if only one item is required you might consider a dropdown. Or you might use a list box with multiple choices. In principle, I think that using different systems for different levels of decision making helps the user to find his way through your form. For example, use check boxes to select paragraphs (the full text of which might be shown in adjacent text boxes), and then switch to list boxes, option buttons, dropdowns or check boxes which look completely different to specify the contents of the selected paragraph. All of that detail might as well be hidden until the user has checked its box.

Displaying a field in a column with a fallback option to another field

I'm creating a view for Contact entity and the issue is that some of their sellers have entered information on Mobile Phone field, while others used Business Phone field.
They'll probably continues to do so. There's no point copying the values as they're entered and both fields are needed.
The simplest solution is to display two columns in the view. However, that occupies the precious width on the form.
I wonder if it's possible to display a column in a view so that it gets its information from field Ahaa and if that happens to be empty, it falls back to displaying the field Buhu. Is it possible and if so - how?
There's no supported way to add conditional logic to a view definition such that it would show or hide columns. The usual way to do this is to store the value of whichever field is populated in third field. Populate this in a plugin and show this only in the view.

SSRS report, is there a way to switch templates based on configuration?

I have been googling for a good description of this but am not having much luck. I am pretty new to SSRS reports and I am probably not using the correct terminology here. If someone could point me towards an article that describes this that would suffice.
Basically I want to pull a bit into my report, and based on the value of that bit (or maybe a varchar) I want to render an address in different formats, or add/remove some sections completely form the report. I suspect this is basic functionality but am having trouble finding an example. Any help would be appreciated!
Thanks!
If you have a table/matrix the best place to put stuff like this is in columns that are outside of the detail or any groups at the top of the table. You can merge all the cells and add rectangles to add specific formatting. The neat part about using header columns is they can be hidden and the space used will not be rendered.
Say you have a table and Row1 and Row2 contain different formatting of the same data. If you have a report parameter named ShowFormat1 then you can optionally hide/show the correct row with formatting.
Click Row one and Set its Hidden property to =!Parameters!ShowFormat1.Value
Click Row two and Set its Hidden property to =Parameters!ShowFormat1.Value
The same concept can be applied to all elements if you are not using a table or matrix. Non-repeating controls, Rectangle or Image for example, can be hidden but the space used will still be rendered.

RDLC footer and dynamic visibility

tldr; Hide the left UI component on the footer and the right component moves over to the center.
I have a .rdlc file that I'm modifying in Visual Studio 2010 (and, sometimes, in Notepad++, as well). This particular report has a footer with two text boxes. The left side textbox contains information that is only sometimes relevant. When it is not relevant, it gets hidden. The right side textbox contains a page number.
So long as the left textbox is visible, everything is fine. However, when I hide the left textbox, the resulting output has the right textbox shifted over to the middle.
I don't want my page number shifted to the middle. How do I prevent this? I tried handling it with a table stretched all across the footer, but the footer apparently won't allow a table to be contained.
Apparently, nobody has any better ideas, so I'm going to say that my comment above is the answer:
"I ended up just creating a duplicate textbox to the one I was hiding and showing it when the original was hidden. This new one just contains a bunch of spaces rather than text. Kludgy, but it worked."
:)
I had the same issue. I just solved the issue be creating another Textbox and changed the hidden formula to vice versa.
Existing Text box (Moving) : =IIF(Parameters!PM_ReportType.Value = "ShowDiscrepancy",TRUE,FALSE)
Duplicate Text box Hide Formula = =IIF(Parameters!PM_ReportType.Value = "ShowDiscrepancy",FALSE,TRUE)
TB Moved to Center
Solved
Adjust the Hide formula