Dynamic continuous form height - ms-access

I currently have a form that has a continuous subform in the footer to show "comments" for the original form record.
My issue is that each comment is of an undetermined size. I am trying to find a way to dynamically change the height of each section in the continuous form to match its contents.
Reading around online I found a lot of people saying this couldn't be done (a few years ago, so whether this is still the case I am not sure) so I tried instead to layout my own "continuous form" in the form header of the subform. This involved creating a text box for each comment using the CreateControl method. Unfortunately this method didn't work either, the new controls completely failed to appear on the form at runtime.
I am sure there is some way this can be done (maybe an alternative method to achieve the same effect) but I can't seem to find it.
Anyone had experienced with this problem or any ideas on how else I may achieve the desired result?

Each record in the subform will always be the same height (the Detail section height). What I've done in the past is to make it fairly small but add a button (or use the Click event of the text box) to open the Zoom box with the whole commment.

Related

How to make a method that will trigger at the event of overflow?

I have a dynamic table in .html that reads the data from the database to display all the elements, and they can obviously fall out of bounds when they reach certain amout.
I don't want to use scrollbar, but instead I want a box to appear if there are elements out of view, just to make it clear that you can still access them despite the lack of scrollbar.
Is there some Angular functionality that can help me with that?

MS Access Report Popup

I have created a report so that when it opens it is a popup form however it looks like this and has too much white space https://gyazo.com/2026b211e7d600fd80a967b27edd1a1d
I tried in design view to make it the size i wanted and yet the white space is still visible https://gyazo.com/7f57630591c9627a7200fadd3c16bd8d
I thought if i put auto resize on no then this would not happen but everything i have tried to so far doesnt't work. I have a few popup forms that meet the size i want and i can adjust it quite freely but the same isnt happening for reports. Is there any way to fix this?
Check Layout view and make sure your objects aren't extending past the margins. It seems really silly, but I struggled with this the other week.
Also, as mentioned, this should be a form. You can still use a query as a recordsource on a form.

Invisible labels and combo boxes affecting report lengths in Access

I have a report in Access that is from a checklist form for closing down projects. When the report is loaded, depending on the project type, certain labels and their combo boxes are marked as not visible. This is done using VBA and the visible property of each control. I have noticed that the report still includes these combo boxes and labels as blank white space. Is there a way to remove the white space?
I have set the detail and the overall report to can grow and can shrink. I am thinking about possibly using sub-reports to do this but I am unsure if it will work.
Edit: Another solution I am thinking about is building several different reports and using an if statement for the project type to determine which report to open but this feels excessive to me. This solution would report in at least 5 separate reports.
Controls don't take space in Microsoft Access. They are positioned at a certain, predefined position, on a report of predefined size. There are little dynamic things about it (yes, nicomp is right, the CanGrow property makes it a tiny bit dynamic).
If you really want, you can move up all controls below a control you're hiding by the height of the control you're hiding, assuming controls take up the full width of the page. To do that, you can use something like the snippet below (iterate through all other controls):
If MyHiddenControl.Top < MyOtherControl.Top Then
MyOtherControl.Move MyOtherControl.Left, MyOtherControl.Top - MyHiddenControl.Height
End If
And if you want to do it properly, add margins for controls and resize the report detail section too.
If controls don't take up the full width, it's considerably more difficult to dynamically organize your report.

How do I find the HTML behind an InfoPath 2010 Form?

I am learning InfoPath 2010 and have a form that I am creating, but have two issues that I don't know what to do about. In the form I have created there are several columns (repeating tables). I pulled the data in from a database and have already set the conditions for what I want to be returned in the SQL, under the Data tab. So I have the correct data returning, however the issue is that the data is not in a consistent even row across the form (lines on a piece of paper) the lines begin to become offset by the second row and continue to the last. I have tried creating a table to put the data into and was hoping that this issue would go away, but that is not the case. How do I fix this cosmetic issue? OR where do I find the HTML code? When I select "Code Editor" under the Data tab, I am given VB code and there is not much code to work with.
Thank you for your help in advance.
CompGeekess
As I was continuing to find the resolution to my delima, I noticed that when a you have a column selected, Properties and Layout tabs appear at the top. In the Properties tab you can set the width and height of the column using in, and px. I noticed that not all of the columns had the same height in px, so I made each the same height, saved and previewed the form and now the rows are no longer offset. Interesting how something SO simple can make a huge different. The difference was only 2px off.
InfoPath actually creates an XML document, not HTML (if you right-click on a field in your Data Source you'll see a "Copy XPath" option). The best way to control your layout is using a Layout Table (Tools -> Design Tasks -> Layout)
I would recommend avoiding setting pixel values as well, and leaving control heights to "auto" whenever possible. If you're using a layout table and having alignment issues, right click in the table and go to Properties. You'll have Horizontal and Vertical cell alignment options (for the cell contents) in the Table and Cell tabs. You can also select multiple cells (just select the contents of them) and then assign that alignment to all in the same way.

Access continuous forms -- how to individualize controls per record?

I have an Access form displaying a tiny amount of data for a certain type of record. Basically it just prints the name on the left and on the right has a bunch of Rectangle controls whose background color I change in the form's OnLoad() function, according to results from a query performed using that record's ID as parameter.
This all worked fine, got my ID/name on the left and 31 boxes on the right, colored if that day of the month is reserved :) But needless to say that function can be completely arbitrary since it's code.
Then I decided to switch to 'continuous form' as to display as many records/items as possible. But alas, it was not to be -- all boxes were colored according to the query/function performed for the first record only. I figured that might be because it's the OnLoad() but changing it to OnCurrent() did not do much either. As it turns out, or that's what I read, the Rectangle intances are shared over the entire form and if I change the BackColor for one of them it changes for that box for each record.
I want to be able to change this according to a query performed on a per-record basis. Is there any way? Up until now I've only been able to find conditional formatting (the feature that's nor available for rectangles nor seems to cater my exact needs?) and kludgy Access 97 text-box hacks.
Thanks in advance :)
You may be coming from an HTML background, where rectangles would be a natural solution. They aren't in Access. I don't think they'll work for you (in fact, "kludgy" could describe the attempt in my humble opinion).
You can however display an image. You'll keep an image for each status ready to call up. I've made visual displays this way. A little later I may be able to post some code, but I think you'll find this plays out pretty simply even if I don't.
ADDED NOTE: I'm glad this looks like it will work for you. You are concerned about "instanced only once" in your comment below. Yes, that's true for rectangles which are unbound controls (because they are designed for mere ornamentation). But you'll be using an image control which is a bound control (see Remou).
Change each rectangle to a text box, Control Source:
=Iif(myConditionIsMet,"ÛÛÛÛÛ","")
The "Û" is the Full Block character in Arial (asc 219).
All unbound controls in a continuous form will be the same; bound controls can be varied using conditional formatting.