I have a form which is set to display continuous forms - just like a table but a bit nicer to look at! is it possible to make the forms height vary depending on how many records there are?
When the user click the button, then it will give out a popup form to the screen, but I want to make the popup form's height as same as the screen/window/monitor's height, because the popup form's height is larger than the screen's height, and every user's monitor's height is different. So, I have to make it flexiable change of the height of the popup form. How can I check the screen/window height by VBA function? In Excel, it has Application.Height to check. In MS Access Form, I cannot find one for doing that.
I have a pop up form that likes to change it's height after I enter design view among other things. I've searched the webs, but can't find out strictly how to set my pop up form to be height X and ALWAYS be height X no matter what.
The best answer I've found so far: [URL] ....
But as soon as I went back into the form in Design View the changes were lost.
Is there some VBA code I can use to resize the form every time it's opened?
Since many years I "fight" with pop-up forms, as in endless view I cannot figure out HOW to fix the height.
Some forms keep a height which was set by the System and it is suitable others have the full height of the Screen and I cannot find any Setting which can influence them.
How to define or to fix the height.
It only works when I set the border to "changeable", but not when I want to fix a height by Setting the border to "Dialog" ....
i have a subform (A) which shows records after an query..i want to set height of subform on base of records as some time query shows 2 records and some time it shows 10 records..how can i set auto height of sub form
i have a subform name(SUBSAL)in this subform i get reocrds for some employee as select combobox Name(CMBEMP).some employee having 2 record or some having 6 record as their transaction
i have sum of transaction at subform footer field but when only 2 records shows in subform it shows a major gap or blank space in subform detail section.
I am trying to make something like custom bar chart on a form using rectangles. I made 4 rectangles (BarBZ, BarBA, BarKI and BarMA) and have the following code:
Code:
Dim PctBZ As Double Dim PctBA As Double Dim PctKI As Double Dim PctMA As Double PctBZ = Me.BZ / (Me.BZ + Me.BA + Me.KI + Me.MA)
[Code] ....
It works perfectly except... the rectangles grow/shrink downwards and not upwards. As a result the bars are aligned to top, while I would like to have them aligned to bottom.
Is it possible to make it so that whatever the dimensions of the image i paste the OLE object's frame will also be the same? I'm having a problem, not necessarily a problem more like a preference, I'm inserting pictures of each individual inside a database and whomever last took these pictures didn't make sure there was a standard size So all the images are different sizes and when they're put inside the OLE frame you can see the image inside it but the frame itself also shows its white background because the image isn't the full dimensions of the frame. I was thinking if it's possible to make the frame automatically adjust to the image's width & height.
I am working on modifying a database that has a register that shows all the relevent information from the main table.
There are date text boxes as follows, for each record:
Short Term Date, Changed Short Term date Long Term Date, Changed Long Term Date Evidence Target Date, Changed Evidence Target Date
I have attached a pic of the register form. It's a bit messy, because I wanted to get all the relevent data on the register before I started playing with it.
What I am trying to do is display only the latest date as detailed below:
If [CxdShortTgtDate] > [ShortTgtDate] Then txtShortAction.Visible = False txtCxdShortAction.Visible = True End If
Doing this hides every Short Term Action Date for every record and not for each single row. The idea is to eventually layer each date on top of each other and display only the latest date.
I am still a novice with VBA, though I have learnt quite a lot off my own back and I am pleased with the results. I would be very pleased if one of you gurus out there can put me in the right direction.
I have to admit that I have been staring at this this problem for some time now and can't seem to solve it. Hopefully someone from this form will be able to help...
The attached jpeg of my continuos form has the "traditional" access #Name? error in it. The text box's contain the formula to sum each column they are under i.e: =sum([txtamount]) , =sum([txtFinalForecastCost]), =sum([txtCostToGo]). They are located on the form footer section. If I delete the last text box the other two text box's sum ok, but all three generate the #Name? error. Any ideas on how to get around this so all three sum?
This continuos form is a sub form of the main form and the last column is a calculation of: Forecast - amount = CostToGo
I have a list box on a continous form that dynamically pulls it's information by why of a query where a field in the query is equal to the value of a field on the form.
The problem is it only does it for the first record and every record after that has values based on the first record. Is it possible for the list box to show different values for each record or is there an alternative method of pulling the information.
I've many items to be put on a form. However, I can't expand the height of the form. The max height I can get is 55.873cm. Could anyone please teach me to expand it?
Hi, Does anyone know how to set the application's width and height? I have an access application and I want to resize the applicatoins' with and height, NOT the forms! is this possible?
Hi everyone, have a problem which is probably very easy to fix but i cannot for the life of me figure out why it is happening. I'm hoping someone with more experience than me knows what this is and how to sort it. I have a form with controls at the top then a subform and then a series of buttons below the subform. I have recently added another control above the subform and moved the subform down, but this has caused the subform to appear partially covering the buttons appearing below it. Seems simple....shrink the subform. It doesn't work. In the design view the subform only has a height of 5cm but in the front end it seems to grow with the form as that increases in size. can grow has been set to no on the subform and the details section. Nothing i do seems to stop the subform from making it's own mind up about it's height!!!
My report has the Section's Footer. Each time the section runs, it will take up a different amount of space. I have already run all the code, to move all the different controls to the top (and be invisible) when they are not needed. So to the best of my knowledge, I have no controls sitting in the lower part of the section. The last thing I run is: Code: Me.S123.Height = Me.S123.Height - 300 s123 is the name of the Footer SEctions. The idea is that it gets progressively smaller. This is all running in: Code:Private Sub S123_Format(Cancel As Integer, FormatCount As Integer)
All the other things work. Here is a sample of it all.. Code:If Me.txt2 = 0 Then Me.a2.Visible = False Me.b2.Visible = False Me.a2.Top = 0 Me.b2.Top = 0 Me.box.Height = Me.box.Height - 300 Me.S123.Height = Me.S123.Height - 300End IfIf Me.txt2 <> 0 Then Me.a2.Visible = True Me.b2.Visible = TrueEnd IfIf Me.txt3 = 0 Then Me.a3.Visible = False Me.b3.Visible = False Me.a3.Top = 0 Me.b3.Top = 0 Me.box.Height = Me.box.Height - 300 Me.S123.Height = Me.S123.Height - 300End If
This runs through 8 different numbers. as I said, all the other things operate properly. They get hidden and move.
How do I make the blank line disappear after the control is no longer visible? I tried to set the Height property to 0 in the OnPrint Event but I got an error message 2191, you can’t set height property after printing has started.
I have an existing report with a number of fields arranged horizontally in a tabular fashion in the detail section. The first field is an identifying line of text and the remaining fields are numerical calculations. The report is basically a simple profitability estimate report for a number of different products.
Behind the fields of data is another text box that is blank, which stretches across all the horizontal fields, and which changes background color using conditional formatting. When printing, this colors the whole row according to that criteria (it changes color based on the relative profitability of each product in the report).
The problem I'm having is that the first line of identifying text can sometimes overflow.
I've set the Can Grow property to Yes for this and all other controls in the Detail section. But the result is sometimes some funny-looking formatting. The identifier (like "Product XYZ with a really long description") will word-wrap, but every other field in that row maintains their own height. In particular, this makes the coloring of the conditionally formatted row look off, because it provides only one line's worth of color, even though the product description has wrapped to two lines.
How I can resize all the controls in the Detail section based on the height of the tallest control, and keep the whole thing dynamic?
Things I've tried: I've tried putting some VBA in either the OnFormat or the OnPrint events that iterates through the controls in the section and resets their heights. In the "OnFormat" event, nothing happens (no errors and no apparent changes in the appearance of the report). In the "OnPrint" event, I get an error that says the height property cannot be changed during a print or print preview.
The VBA I tried using was as follows:
Code: Dim ctlIt As Control Dim lngMaxHeight As Long For Each ctlIt In Me.Controls If ctlIt.ControlType = acTextBox Then
I have a report which will be printed on preprinted paper. On this paper a footer is printed with e.g. address info.
The report has a detail section with a height of 3,5 inch and canGrow=true.
The reportFooter contains totals. The size of this footer, and placements of the fields prevents printing data on the pre-printed footer of the paper.
But when the report has multiple pages, the report footer will be printed on the laste page, and the detail section is expanding to the bottom of the paper, overwriting the pre-printed footer. I need a max height of the detail section, or another solution.
I have a report that prints lab tests. One section has 4 columns that are framed. Only the first control (STest) expands to more than one line. The Can Grow works on this control and subsequently the section expands. I need a code that expands the height of the other three controls to match that of STest. I am using office 2010.
How to fix the height and width of a report. I would like the report to stay landscape, 100mm wide, 62mm high. This is required by a label printer.
The issue is that a A4 laser printer has to be set as default (for other software) so when the report is launched the size is set to the default printer size, when I select the label printer it fails as it is the wrong size.
In the detail section of my report, I recently added a second row which has only 1 text field. When the value of the textbox in the 2nd row is null, I want the total row height equal to just the first row. When the value in the textbox in the 2nd row is not null, then the total row height is equal to row 1 and 2. I tried to make the textbox in the second row invisible when it had a null value thinking that when it was null, the report would shrink to the first row height, but that didn't seem to work.
I am working on a report that will have 16 sub-reports, one right below the other. Because of the complex nature of the calculations in the groupings it seemed easier to "build" the report using vba rather than using the report's built-in grouping ability. The issue I am running into is that there seems to be no simple way to control the height of the sub-reports. I had hoped that setting "can grow" to yes would change the height of the sub reports and move all subsequent sub reports down (Allas)
As an alternative I thought too that I might be able to set the height of the sub-report control, which would make for a tricky but not impossible bit of programming, but (Again allas) I can't seem to find a reasonable way to determine the required height of the sub-report's control.