I am trying to build a pop up zoom in form which will zoom in on a report embedded in a tab control embedded in a form. My zoom in box control is called txtzoom. The code i thought would work looks like the following
Private Sub Form_Open(Cancel As Integer)
Me.txtZoom = Forms("frmContactsSwitchboard").Report("rptContactPage05")!Note
End Sub
My plan is to be able to zoom into a field, and be able to edit it.. I am not sure if this is possible.
I would appreciate if someone who is familiar with this issue could please let me know what i can do to resolve it..
Cheers,
A
Do you know about Access's built-in (but flawed) Zoom window? Try pressing Shift-F2 on a table, query, form, or report (in report view). Unfortunately, the font defaults to Tahoma 8pt and resets each time you close Access. So, the first Shift-F2 doesn't help much, but once you've changed the font size, the rest of the functionality is there. You may want to just give the user a label that suggests using Shift-F2 to zoom.
Related
I am debugging an access application built by another developer. As I debug, I want to be able to see the results of specific queries and tables as I go. On one particular form, the navigation pane (which includes the list of tables, queries, forms...etc) is minimized and disabled any time the form is open. The navigation then maximizes and is fully restored when the form is closed or in design mode.
I've searched throughout the VBA and there doesn't seem to be anything that's controlling this behavior. I know there is some VBA that can do this like
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
but none of these can be found in the code behind. Any idea what else might be causing this?
The Modal property of the Form will cause such behavior when set to true.
You can set that property on the property sheet for that form in the "Other" tab. It can be set by VBA-Code with code like this:
Forms("yourForm").Modal = True '(or False to disable)
We're atm creating Reports with the reporting service, but it's not quite defined where to use which Font.
My easiest approach would have been to create a Variable per Report and set the Font in the expression:
Variables!FontStyle.Value
Sadly it doesn't seem to work. If I print the Variable-Text, I see the Font, but it seems like I need some sort of conversion.
As far as I found I've not seen any possibility to do such things, the only Idea would be with HTML-Tags, but I guess since there is a Font-Expression, there is a easier ways.
BTW: I'm really having a lot of small stuff, which bugs me a bit in SSRS, has someone some good articles / books for "Best practices" etc.?
Thanks in advance.
If you want to use a font style for the entire report you can set it with a variable. In the report properties there is a sub heading called Variables, click the dotted button to add a variable. In the report properties window click Add then give it a name you will refer to later like myFont, enter Pristina into the value as an example. Click okay.
Now to call your variable right click on some text and go to properties. In the text box property window click Font and then the fx button next to the font name, then enter your font variable you set earlier =Variables!myFont.Value.
There you go
EDIT: For clarification, I'm talking in the below post about tabbed document browsing, not a Tab Control. However, if you're looking for roughly the same problem but regarding a Tab Control, Gord Thompson's answer is correct. Two answers for the price of one!
I've got an Access 2007 database that uses tabbed documents. I need to run some VBA code every time a user selects the form called "Reports", either via opening it or clicking on its tab if it's already open.
I could achieve much the same thing by closing it each time it's used and running the code on an OnLoad event, but ideally I'd like to keep it open so that users can keep the settings of the various drop down boxes, radio boxes etc that they've already set on "Reports".
I was hoping for an event that could run code on tab reselection, but neither of my guesses (OnCurrent and GotFocus) seem to work (OnCurrent works only when the form is opened, like OnLoad would).
Any ideas greatly appreciated - can't find what I'm looking for on Google, though I suspect that's because I don't know exactly what I'm looking for.
The .Value property of a TabControl returns the index (zero-based) of the current page. So, if I have a TabControl named TabCtl14 that contains two pages, FirstPage and SecondPage, then the code...
Private Sub TabCtl14_Click()
If Me.TabCtl14.Value = 1 Then
MsgBox "SecondPage was clicked."
End If
End Sub
...displays the MsgBox whenever I click the "SecondPage" tab in the TabControl.
Have found the answer I was looking for. It's the OnActivate event.
I have a form including listboxes. I'm trying to change order of listboxes. I tried bring front or send back but they are not working in form view. I found z index property for arranging their priority. However, following codes are not working. Is this correct way to do it? Or is there any other way with or without codes to do this?
Me.Controls.SetChildIndex (Me.List0 , Me.List1)
Thanks for any help.
Without using code:
You can change the z-order by right-clicking any control and selecting "Position" then selecting either "Bring to Front" or "Send to Back."
Unfortunately, Access does not support the ZOrder method for manipulation using code. Microsoft Forms does support the ZOrder method which can get confusing when it comes up on Access Help.
As I reread your question, I wonder if you're talking about tab order. If so, right-click and bring up "Properties," select the "Other" tab, then adjust the "Tab Index" property. Also, make sure that the "Tab Stop" property immediately beneath is set to "Yes." In code you would use FormName.ControlName.TabIndex=0 to set a control to the first tab position.
Hope this helps!
Reference: Personal experience (and hours of frustration)
docmd.RunCommand acCmdDesignView
forms("form1").Controls("text0").inselection=true
docmd.runcommand acCmdSendToBack '(or docmd.runcommand acCmdBringToFront)
docmd.RunCommand acCmdFormView
Also, ZOrder is still not supported by Access 2016. As such, I have not yet learned a way to write a single line of code that puts a control in between two others, I just send the middle to back and then the back to back, and expand this to however many controls have to overlap.
And last, even though you use the VBA for ZOrder, your English does ambiguously sound like forms("form1").Controls("text0").TabIndex=34, which as Olek suggested, is also quite simple.
I did this on one Access form: The control I wanted on top I just cut and pasted it back to the form, then moved it over the one I wanted to cover. In this case, it was a text box (bound), almost the same size as a combo box (unbound); only the dropdown of the combo extended a bit to the right of the text box, so when the form was loaded the text box looked like a combo box. The user clicked the dropdown and made a choice and the record(s) pulled up were reflected in the text box.
SO I have a subform, that simply has one chart object on it. Its small, and this is the only purpose of this sub. Then I have about 10 forms that each have a sub windows with this form as it's child. I use a UNION query to show the current balance of 10 accounts on each form with this chart for comparative purposes. Everything works fine except for one small thing...
when you open any of these forms, you have to take your mouse over to the actual sub window and click inside of it to get the chart to show. once you do it works fine, on any and all forms, but this same issue if recurring on all these forms as well, so I am sure I am missing something here??
Any ideas about this one?
thanks
Justin
I think you can work this out by not using a subform, but rather a chart control directly inserted in the form. I know it can be a headache to design a chart control in every form, but by doing it, you can control directly the data source of the chart independently from any other form.
Example:
I will suppose that you need to update the chart after updating a text box (txtExample).
You can alter the data source of the control usint the afterUpdate event:
Private Sub txtExample_AfterUpdate()
chart1.RowSource = "SELECT ... FROM ..."
chart1.Requery
End Sub
The RowSource property of the chart object will be altered and updated every time the value of the text box is updated.
Hope this works for you
I have looked around for this problem and found that me.graph1.requery doesn't help in my 2003 version. I did try in desperation this: docmd.requery (Graph1) that crashes but when you put on error resume next it does show the graph everytime! True Microsoft style I guess to fix it with another buggy thing.