Modules & VBA :: Sizing ChartArea MSGraph Control

Apr 18, 2015

Using Access 2010 on Windows 8.1. I have a subform that has 18 small MSGraph objects on it. I am requerying each chart when the user selects different filter options. The charts are very simple (no legends, no titles, 3 columns on each, number format in %) the MSGraph controls are all the same height and width. I have am using a public sub to try to control some of the formatting eg font size and style for ticklabels and colour of the columns (which all seems to be working) but despite this consistency, the graphs all render different sizes failing to "Stretch" to fill the MSGraph control. The tickLabels are also different sizes despite turning Autoscaling off and setting a font size. I can't set the chartArea.Height or width. At this stage I would settle for them all to be the same size -

Code:
Public Sub GreatFormats(EBSArea As String, GrNumber As Integer, SFrmName As String, FrmName As String)
Dim GrphName As String
Dim GrpType As String 'Status or Priority Graph
Const twips As Long = 1440
Dim MySForm As Form
Set MySForm = Forms(FrmName).Controls(SFrmName).Form
For I = 1 To GrNumber

[code]....

View Replies


ADVERTISEMENT

DivisionsPerTick/MsGraph In Access

Feb 1, 2008

I can find plent of references to using the Microsoft Chart Active-X on the internet.

I can find very little information on MsGraph objects. I actually control them rather well through VBA (i.e., Graph_Data.axes(2).minimumscale = MinScale(((Val(Me.ProbeLowestRespoce)) - 5) - ((Val(Me.ProbeAverageResponce))))
)

It's funny that the example statment only works with axes spelled incorrectly!

What I would like to do, if I load larger amounts of data is change the tick marker to the equivelent to "divisionspertick=2". That is a MSChart control, which I think is different from MSGraph.

In Chart, the following statement is, apparently, correct: .Plot.Axis(1).CategoryScale.DivisionsPerTick = 2, but doesn't work with MSGraph.

Does anyone here know the correct VBA commands for an MSGraph object? Is there a list, somewhere, of all available parameters that can be modified programmically?

Thanks

View 1 Replies View Related

Sizing Forms

Mar 6, 2008

Hi,

I'm hoping to find out how to size my forms automatically and have them the same size (without manually sizing the window). Any ideas?

Thanks in advance....

View 3 Replies View Related

Sizing A Form??

Aug 10, 2006

I set my form to come up on startup as the default sortof page...

When it came up however it only opened up in a small window, and I wish that I could get it to come up as a fullsize "Maximized" window. What do i do to get this to happen? Also, i cant re-size the form when its in form view. All i can do is click the X.

HELP ME PLEASE!!

View 1 Replies View Related

Sizing Preview Window

Aug 17, 2007

I have a Form with a Command button that will cause a Report to run in Preview mode. My code is:
DoCmd.OpenReport "reportname", acPreview
DoCmd.RunCommand acCmdZoom100
The zoom allows the report to be readable but I am unable to change the width of the preview window so the entire report is visible.
Any ideas?
thanks in advance for any help...

View 2 Replies View Related

Re-sizing Check Box, Radio Buttons, Etc.

May 1, 2006

Hi all

Just found this forum, looks great!

When a control like a check box or radio button is on a form, how can you make the size of the actual control bigger? When changing the size in Properties, it only increases the size of the black border.

Thanks

Rich

View 1 Replies View Related

Access 2007 Trial - Form Sizing

Dec 22, 2006

Access 2007 is behaving very peculiar concerning sizing of forms. For example, some open at an enormous size (25 plus inches) when the width size in the property box is 8 inches. I've tried various combinations of Auto Center, Auto Resize and Fit To Screen -- all with bazarre, unpredictable results. Does anyone know if there is an "issue" (bug) in Access 2007 Trial concerning form sizing? Thanks.

View 8 Replies View Related

Word :: Sizing MS Word Table To Same Size As Recordset

Aug 14, 2014

My end goal is to populate a pre-existing table in an MS Word document with records from a query. The easiest way I've found (through scouring the internet) is to start with the code below (ran during OnClick() even in Access) to get the table the same size as the recordset:

Code:
Dim wDoc As Word.Document
Dim wTable As Word.Table
Dim wCell As Word.Cell
Set wDoc = appWord.Documents.Add(strDocLoc)
wDoc.Visible = True

[Code] ....

The code will shrink the table down just fine if the table has more rows than the recordset +1 (for header column). My hangup with this is the last line ("Selection.InsertRowsBelow 5") isn't executing; rows are not being added to the table. I get no errors -- it just does nothing. I set it as "Selection.InsertRowsBelow 5" arbitrarily just to see if it would even add rows, and sure enough it's not.

View 9 Replies View Related

Modules & VBA :: How To Know When Control Has Focus

Sep 12, 2013

In the following code, i am trying to determine if command button has the focus:

Private Sub lstOrg_LostFocus()
If Me.cmdEditOrgProfile_GotFocus() Then
Exit Sub
Else
Me.cmdEditOrgProfile.Enabled = False
End If
End Sub

The second line returns error.

How would I know if a control has the focus?

View 2 Replies View Related

Modules & VBA :: Subform In A Tab Control Form

Mar 3, 2015

I have main form (frmProcedures) that has a tab control with 2 pages. One of the pages I have a subform that contains a listbox control controlled by a query.The subform is a search and display form. When I open the subform on it own, it opens up fine. However when I try to open up the mainform, it always prompts me to enter the parameter value. I have to atleast hit "Enter" for the form to open up.Even after hitting the enter key, when I try to navigate to that page, I keep getting the parameter prompt.

Here is the query that populates the listbox control. And the parameter that is prompted is Forms!frmSearchMulti!SrchText that you see in the query below

SELECT Procedures.ProcedureName, Procedures.BusinessLine, Procedures.Manager, Procedures.ApprovalDate, Procedures.NextApprovalDateFROM ProceduresWHERE (((Procedures.ProcedureName) Like "*" & forms!frmSearchMulti! SrchText & "*")) Or (((Procedures.BusinessLine) Like "*" & forms!frmSearchMulti!SrchText & "*")) Or (((Procedures.Manager) Like "*" & forms!frmSearchMulti!SrchText & "*"));

I do have a searchbox that when updated with search string issues the requery to update the values in the listbox.

View 3 Replies View Related

Modules & VBA :: Find Name Of Textbox Control

Jan 30, 2014

I'm looking for a way with VBA to find the name of a textbox control after inserting the cursor in that textbox.

View 3 Replies View Related

Modules & VBA :: Identify Image Control Name?

Nov 8, 2013

I have a global function which I have hooked onto the onClick event of controls. Currently I am using commandButtons as my control of choice. In my function I can then reference Forms.ActiveControl which is no problem.

However, for lots of reasons I really need to use Image controls. Now, my problem. Image Controls have an Onclick Event, but they do not get focus so the Forms.ActiveControl will not work.

How can I identify the image control that has generated the click event if the control itself does not get focus and so cannot be referenced by ActiveControl? Working on a possibly work around, but could do with the best brains in Access on the case!

View 3 Replies View Related

Modules & VBA :: Referring To Tab Control On Sub Form

Jun 9, 2013

I have the following setup:

A main form - named [formMain]
On [formMain] I have a tab control - named [tabMain]
[tabMain] has 3 pages named [pageOne], [pageTwo] and [pageThree].
On [pageThree] I have created a subform named [formSub].
On [formSub] there is a tab control named [tabSub].

Now what I would like is to make [tabSub] (in)visible if the user switches from [pageOne] or [pageTwo] to [pageThree].

Code:
Sub tabMain_Change()

How do I refer to [tabSub] from within this subroutine? I am trying something like:

Code:

Forms![formMain]![pageThree].Form![tabSub].Visible = False

but it is not working. What should be the correct way?

View 2 Replies View Related

Modules & VBA :: Make Control Invisible?

Sep 22, 2013

How do I make a control invisible?

View 5 Replies View Related

Modules & VBA :: Set Focus On Control After Update

Jan 15, 2015

I have a continuous form populated with a pivot view from SQL. When I enter data in the form I send the data to SQL (ctrl after_update) and then re-populate the form. It works.

When I have entered data in a ctrl - then I have to bookmark the record so I can select it again (find_first). I can "save" the location of the control where I have entered data, but I want to select the location where the user has set focus - which triggered the ctrl after_update..My ctrl after_update looks like this:

Code:
txt_account = Me.Parent.txt_account_id.Value
txt_cost_center = Me.ActiveControl.Name
Call update_data_input(Me.ActiveControl.Value, Me.account_id.Value, Me.ActiveControl.Name)

[code]....

View 6 Replies View Related

Modules & VBA :: Get Names Of Subforms In Tab Control

Nov 13, 2014

I have a main form that has a Tab Control. The tab control could have 5 to 10 tabs. Each tab has a subform and in some instances a tab could have a tab inside that tab with subforms as well. I want to be able to get the subform names in each tab.

I am able to get the main form name by using me.form.name

How can i get the names of each subform in each tab?

I am creating a dynamic form and need to get the names into variables for later use...

View 3 Replies View Related

Modules & VBA :: How To Control Graph Position

Jun 19, 2013

I have some graphs on a report that I need to dynamically position. The user selects which graphs he wants to put in and then the reports repositions the graphs based on input.

I've been using the following code to move the graph:

reports!rpoly.gGPCMWbyDRI.top = 3.625

which compiles, but moves the chart to the "0" position. I tried using a string ("3.625"""), or a stint ("3.625") but neither worked.

View 2 Replies View Related

Modules & VBA :: Go To Next Visible Control In Tab Order

Jul 12, 2014

How do I get VBA to say: Go to the first control in the tab index after the current active control (that is visible atm),
except such and such controls (because they will lose visibility in a moment).

View 14 Replies View Related

Modules & VBA :: Way To Find Which Control Is Being Clicked

Aug 18, 2014

I have two command buttons having two textboxes to populate. The way I am going to populate the text for both the textboxes is same but on separate clicks. Is there way to find which button (or control) is being clicked in runtime. I think I have done it a long back but not getting right now (I had a gap in my career). The keyword sounds like some 'Defaultcodecontrol' or something like that only.

View 4 Replies View Related

Modules & VBA :: Can Have A Combo Box Without A Control Source

Dec 21, 2014

I want to have a Combo Box on a form, that derives its values from a Table, but does not send selected values to another table. I want to use the value selected in the combo box in VBA code.I have set up a combo box, without a control source, and it shows the values in the drop down list but after I select one the box just goes empty. I expected that after selecting a value that value would be displayed in the combo box (and that would then become the value of the combo box that I could then use in code. I.e, CmdBox1.Value). If so, what do I need to do so that the value selected is displayed (and becomes the value of the combo box?).

View 2 Replies View Related

Modules & VBA :: Get Value Of A Control In Another Running Database

Nov 7, 2014

I have a POS system, packaged with Access Runtime, running on a PC and have developed a database system to provide additional function. I have no documentation to the names of the Forms or Controls in POS. My ADDON system does link to the POS Tables and has some Tables of its own.

At the time in the POS system where the cashier checks out the customer, they need to AltTab to my ADDON system to enter some information for the customer. They remember to CustomerKey from the screen on the POS system and key it into a Form Control in my ADDON system.I want to, from my ADDON system, read the value of the CustomerKey in POS and fill it in so the cashier does not need to remember/type it.

Is it possible to get the data from another already running Access database?I don't know the name of the control. Is it possible to run through a list of Forms and Controls in the POS system from my ADDON system?

I do know the name of the field in the Table and expect it to be current and might have to get that?Failing all that, is there a Collection of running Access databases? I could go through its Forms and Controls one time looking for what i want.

View 1 Replies View Related

Modules & VBA :: Passing Combo Box Control To Procedure

Nov 21, 2013

On my form I have a combo box where the user can select the sex of a person. I had set the row source of the combo to a table, tblSex and this works fine. Now I want to programatically add the table entries ( simply male or female) to the row source, having set the combobox to value list. I cant see how to pass the combobox and tablename parameters and I am getting an error on form load "The expression you entered as the event property setting produced the following error: UserDefined type not defined" The calling procedure from frmPeople is

Code:
'---------------------------------------------------------------------------------------
' Procedure : Form_Load
' Author : Administrator
' Date : 21/11/2013

[Code].....

I think the way the parameters combobox and tablename are passed is incorrect. I want to write a robust procedure which I can use for each of the comboboxes on my form.

View 7 Replies View Related

Modules & VBA :: Listview Control Selected Item?

Jan 30, 2015

In a form, I have a listview control bound to a TreeView control.

By default LV considers "selected" the first item on the list even if it is not highlighted.

In Form is a command button that performs an operation on the item selected, but to prevent accidental activation requires two tests:

1) the list is not empty

Code:

If LV.ListItems.Count = 0 Then Exit Sub

2) an item is actually highlighted.

How can I make the second test?

View 3 Replies View Related

Modules & VBA :: Copy A Control In Form Design?

Oct 24, 2013

I need to duplicate a number of controls on a form. They are all acCommandButton types, but they have different images, sizes etc.

Anyway, my thought process was if I have a "template" acCommandButton then when I create my new controls if I could use this template then the code I have hanging off them (I have a function being called on the onClick event, borders are set to hairline, themes turned off and various other settings) would be copied. Save me trying to set them all individually.

So, my question is, can I "copy" a control in form design through VBA. Once I create the copy of the control I can then change the couple of properties I need to and "hey presto" I have skipped a load of settings that I don't need to set.

At the end of the process when I rename my form I can delete my template control and I have a working form.

View 7 Replies View Related

Modules & VBA :: Auto Populate Hyperlink Control?

Nov 14, 2014

I have a form titled 'New/Edit/Search Contractor Employee" that provides controls to fields within a table titled "Contractors". In this table, I have a Hyperlink field that will store the location of the files related to individual employees. On this form, I have a Control that (at the moment) the user can copy a Hyperlink and enter into this, to populate the field. This will then allow the user to click on this Hyperlink to open up the individual folder location to drag and drop whatever files they want associated to this individual record.

I have created a Command Button to automatically create a unique folder for this record, VBA below:

Private Sub Command168_Click()
strPath = "V:IntProdTrans&OpsTERMINALSDriver and Contractor Database 2014ContIndPW" & "" & txtCompanyID
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
strPath = "V:IntProdTrans&OpsTERMINALSDriver and Contractor Database 2014ContIndPW" & "" & txtCompanyID & "" & txtFirstName & " " & txtLastName
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
End Sub

What I'm trying to work out now is how to automatically enter this new folder location into the Control, which is then viewable and can be clicked on. I managed to do this (can't for the life of me remember how) but it entered the location as text and I wasn't able to click.

The Hyperlink control is titled 'Induction Paperwork' relates to a Hyperlink field.

View 1 Replies View Related

Modules & VBA :: Code Doesn't Wants To Set The Control Default Value

Aug 7, 2013

code doesn't wants to set the control default value

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved