I have a continuous subform (Data) within a single form (Main) where I use conditional formatting. The problem is, when I click the scroll bar to go down the list, the conditional formatting is removed until I un-click the scroll bar. Scrolling through the list with the mouse wheel works perfectly.
I suspect this is due to a refreshing or repainting of the formatting that is inherently triggered by a click?
I tried using Application.Echo False, and Me.Repaint = False, with no luck (although I am not even sure where I would need to put these).
Does anyone have any experience with this? Note, the data displayed via subform Data is static, meaning the user cannot update the fields within this particular subform (not sure if that simplifies anything).
On a continuous form, conditional formatting is only performed on records that are within view. As new records are scrolled into view, there is a brief delay while the conditional formatting is calculated. As records are scrolled out of view, their conditional formatting is discarded. You should find that scrolling with the mouse wheel does have a bit of a delay in the conditional formatting.
In some situations, one solution is to build the conditional formatting into the recordsource. For example, suppose negative values for Balance should be shown with a yellow background, and you would like to be able to scroll quickly through all the records looking for yellow ones.
I do this by adding another field to the recordsource:
IIf([Balance] < 0, String(30,ChrW(9608)), "") AS BalanceBG
and then binding this to a TextBox with text color of yellow and font of Courier.
The 9608 character is a solid block, and a string of them fit tightly together to make a solid bar.
With this TextBox positioned behind the TextBox for [Balance], the yellow background will show even as the scrollbar thumb is dragged up and down.
Related
I need to hide or display the header of a SSRS report based on the value of a parameter. The parameter is called "Show Header?", and the values of this parameter are true and false. Is there a hide property for headers? If so, I'm not able to find it.
I'm not sure if you are talking about the table Headers or the report header (some people seem to use the term interchangeably).
I'm still self learning SSRS so there may be better options out there but a quick test i found the following.
For a Boolean Parameter type:
I used the logic below to hide the visibility based on parameter (you may want to play around with the true/false order depending on your parameter to get it to work how you want):
=IIF(Parameters!ShowHeader.Value, False,True)
Table Headers:
Just highlight the text boxes you want to show/hide and open up the properties, under Visibility select "Show or Hide Based on Expression"
(NB. i found highlighting the full row would only let you select the full tablix properties not the single row so I just shift clicked all the cells and pasted the IIF statement into the "Hidden" Property for the selection in the properties window)
Report Headers:
I am not sure you can hide the Header (couldn't see any immediate hiding properties or options), however you could hide the contents of the header using the same sort of process (right click properties and alter the Visibility setting or add the code into the Hidden property). In testing I found that the header would reduce to remove white space when items where hidden so may work out for you.
The sneaky way I've found to get around the limitation of SSRS on this is to put my "header" in the first row of the first tablix and just hiding the actual report header, which you probably know cannot be deleted. That way, I can show or hide the first row of the tablix by whatever criteria I desire. This method works well for me.
SHORT DESCRIPTION: I need to see all the columns in a datasheet subform. Specifically - 12 columns of months. To do that, I need a horizontal scroll bar. To get to that scroll bar is a challenge. I am developing in MS Access 2007.
THOROUGH DESCRIPTION:
I have a subform 'frm_SP' which displays in datasheet view that is 22" wide which is limit in width for a form - it is nested in another subform called 'frm_stage'.
I finally discovered that no matter how wide I make the very top "Parent form - 'frm_Entry' I can't seem to make ALL of this 3rd nested subform 'frm_SP' visible. The horizontal bar at the bottom just seems to compensate by proportionately growing to keep the limitation intact - this is frustrating.
As you can see in this image below, I have to scroll down to see the horizontal scroll bar. Why is it so far down? Did I specify that somewhere? It keeps that distance no matter how many records exist in the datasheet. So if it only had 4 records, I'd still have to scroll all the way down to see the scroll bar.
Similarly, I have a set of records that go beyond the horizontal scroll bar and I have no way of making the window large enough to see those records. So I have had to tell the client to open the actual table if they need to edit those records.
I have hesitated to post anything like this because it requires images, but now that I have done the work, hopefully this can solve a lot of issues for other users. Maybe this is the reason that there aren't many answers on the web that I can find.
Any tips, suggestions for alternate methods are welcome.
I added "SendKeys" code for the arrow keys so that that the 12 boxes would function more like a spreadsheet.
But I don't understand why January is skipped and then it continues to skip every 2 boxes
Here is the code:
Private Sub txtDEC_NC_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 40 'down
SendKeys "{TAB}", False
Case 38 'up
SendKeys "+{TAB}", False
End Select
End Sub
If you haven't already, try increasing the size of your 2nd-level form (as well as the subform control on that 2nd-level, which houses the bottom level form).
It looks like your bottom level form (with a max width of 22") requires a horizontal scroll bar in order to display within your 2nd-level form. This causes the scroll bar to appear within your 2nd-level form (where you have to scroll-- within the top form-- down in order to see it).
Instead, you probably would prefer that scroll bar to appear on your top-level form, which I believe you will get if your 2nd-level form (and the subform control for your bottom-level form) are also set to a max-width of 22".
The bottom level form will then display within the middle form without the need for a middle-form scroll bar, and the one (and only) scroll bar will render on the top form, where it will always be easily accessible without the need to scroll down first.
I have some thoughts on what causes the extra vertical white space in your second form, but I wonder if the above might not solve your problem.
Just a thought. (And I realize that this is a very old question, so perhaps you no longer need any suggestions here--in that case, I'll just leave this comment for others who may have a similar issue in the future).
Any ideas on how to keep the scrollbar/focus on the top of a form?
I have continous form with many textboxes and listboxes that make the user scroll down the form no matter the resolution size of their screen. Ever since I implemented a Listbox with a rowsource query that will vary on the record, every time I change records the vertical scrollbar of the form will change focus to the bottom of the form.
I tried changing focus to controls on the top of the page or changing ways to change the rowsource of said listbox (using vba code like listbox.RowSource = theSQLQUERY or making the rowsource of the listbox with the sqlQuery). It used to work before I implemented that sourcecode, it had a sourcecode before and the problem never happened.
The rowsource query looks like this :
where active_flag = 0
My question is, How can I keep the vertical scrollbar/focus on the top of a form taking into account the listbox that changes rowsource?
The key is:
Ever since I implemented a Listbox with a rowsource query that will vary on the record, every time I change records the vertical scrollbar of the form will change focus to the bottom of the form.
Your code is iterating through every single record, from top to bottom. It goes to the bottom because that's where the code stops. That's fine, it's how Access works.
So, after that code, add the following:
Me.Recordset.MoveFirst
Or
DoCmd.GoToRecord acDataForm, Me.Name, acFirst
I have a report with a table in it. And each table cell has borders around it.
The problem I'm experiencing is that if I hide the textbox in any of the cells, the borders also disappear.
I want the textbox to hide but still show the borders.
The textbox in question shows the visibility toggle icons (+/-) so I can't use an iif statement to change the textbox's value to be an empty string when I don't want to see anything in it.
You can place the textbox inside a rectangle.
***So , I was having this same issue:* **
The Problem:
I assume that you placed a border around your text box and decided to place the hide and toggle element to your text box. or your Rows are not stepped down. Two solutions, I think the first solution is what you are looking for:
Solution 1:
I Noticed that SRSS reporting also has this grouping feature by rows. So to hide the text in the textbox without losing borders is to create a step-down feature within the grouping. So basically you can assign hide text box property without disturbing the rows above the textbox. This may be a better solution.
Solution 2:
You must instead place the border attribute to your text box and place the hide and toggle function on the individual groups. So for you, you have to remove the hide + toggle feature on the textbox. Right click the group element in your "rows" or "columns" and assign your drilldown hide + toggle feature on the group elements. In other words: "group properties" not "text box properties"
I hope this re-solve your issue.
I ran into the same issue. I solved it by changing the text color to white (or whatever the background color of the textbox is). I was doing this inside a table, and couldn't find a way to insert a textbox inside of a rectangle as stated in the other answer...
I had similar problem and used similar approach like #Anony Mous, but instead of changing text color to background color I used expression to change text value =IIF(InScope("RowGroup") = "True", Fields!Textboxvalue.Value, "") - and it works as expected.
Problem with background color change is that, if user unintendely select the text and makes it active, it become visible.
Just select the Textbox in question, run F4 (to access to the properties chart at the right side of VS or SQL), select the HideDuplicates dropdown and Select the Data Set that you are using :)
I have continuous forms made of a header section and a detail section. Controls in detail section are bound to a recordset, while the ones in the header are not bound.
At opening time, focus is made on the first (left) control of the detail section or, if the recordset is empty, first (left) control of the header section. In such a situation, and for forms that need an horizontal scrollbar, the scrollbar will be set to the right side of the form, and left-side info wil be hidden, confusing the user.
Any way to make sure that, in all case, my form will open with its left side visible?
Thanks
Usually to avoid focus discrepancies, I use a small transparent button that I just call btDeadFocus in the header -or the detail section- of my forms.
This invisible button doesn't actually do anything more than capturing the focus. I just make sure that this button is set it as the first control on the form using the tab order list.
The button also becomes useful in situations where the focus cannot be kept on a control. For instance a control that needs to be disabled. I just move it to the btDeadFocus instead.