Modules & VBA :: Update Range For Graph Automatically
Mar 17, 2015
I am trying to update the range for the graph automatically and I'm calling this from Access because my data exists in Access. I've attached a sample file.what I am trying to do:
1) click on the button
2) button will update the usedrange in "trending" tab
3) have the graph's data range based on the usedrange.
Code:
Dim xlApp As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.Open "C:Documents and SettingsgjiaDesktopmetric_DEV.xlsx", True, False
[code]...
note: the columns will grow bigger to the right, which is dynamic, so I've used usedrange method, but the code fails on the usedrange line saying the object or method is not being supported...
View Replies
ADVERTISEMENT
Nov 2, 2013
I have 3 fields on a form PU_POINTS, SU_POINTS & 2_MILE_RUN_POINTS. The user enters a number 1-100 in each of these fields. If the user enters a number in any of the 3 fields of anything less than 60 then I want it to check a fail box. If the user enters all numbers 60 or more then i want it to check a pass box.
View 2 Replies
View Related
Jul 29, 2013
Is it possible to update the data for a chart graph in a word document from Access using VBA?
View 4 Replies
View Related
Jun 18, 2012
I have a graph which queries data from a table, I need the graph to show the dates in the table with the correct results specific to that date.
However on the graph its displaying dates not in the table so its plotting the results out wrong, I need it to only show the dates in the the table on the bottom axis.how to do this.
View 1 Replies
View Related
Mar 19, 2014
In my Access form, users update 4 checkboxs when their work is completed, when this 4 boxed checked then the 5th checkbox will check automatically using afterupdate. Now i have added the 6 the column with date completed, here i want the date to be updated automatically when the 5th column is checked automatically. how to do it?
View 10 Replies
View Related
Jan 25, 2015
I have a form fmrClasses and what I'm trying to do is write a code that as soon as the user types a beginning time will update the end time to 3 hours later for example If user enters 9:00AM for beginning time the end time will be set to 12:00 pm.
View 9 Replies
View Related
Mar 18, 2015
I have a form and a subform
Which method should I use if I need to update automaticaly a field in form based on an event in subform ?
Just to be more clear, have a look in the below example.
In first print screen, student "Johnson Nick" has not completed all tests in TestA subform, the form field "DateCompleteA" is blanc.
Once a student completes all tests in Period A, I need the form field DateCompleteA to show the date that he completed the last one. (18/3/2015).
If student has not yet completed all tests in TestA subform the Form field DateCompleteA must be blanc.
Student has not completed "literature"yet, DateCompletA field is blanc
Student completed ALL his test, subform is updated, Form field DateCompletA is updated with the maximum date.
View 3 Replies
View Related
May 14, 2014
I have a linked Excel graph in my form. The process I go though to update them is:
User clicks on button
Excel opens up
Procedure in Excel runs that updates the data and the graphs
Excel Closes
The user does not see any of that. This process works fine. But the linked graph does not actually update in the Access Form. To do that I run the following code:
Code:
Set ctl = Me!OLEUnbound_pream
With ctl
' Enable control.
.Enabled = True
' Set Locked property to False.
.Locked = False
' Set Verb property to activate for editing, but not visible
.Verb = acOLEVerbShow
.Action = acOLEActivate
End With
The problem I get is that once .Action = acOLEActivate is ran, Excel opens. I don't understand why it does that and how do I close it.
View 3 Replies
View Related
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
Oct 7, 2013
I have a split form with graphs in the upper design section and the table of the data that the graphs represent in the data view underneath. I would like to make the graphs dynamic with the data from the forms if the data is filtered in design view.
I know how to get the filter from the data view by using the .filter and I would like to use that as part of an SQL statement in my Rowsource for the graphs to dynamically change the graphs when a filter is used. My problem is the data is returned with .filter function returns with quotation marks (example below), and because I'm wanting to use that data in a string to change my rowsource the quotes need to be replaced with an apostrophe. How can I change the quotes to an apostrophe, or is there a better way to "filter" a graph?
Example:
Returned from .filter
([FrmTable].[CurrentABCS]="A")
What I need:
([FrmTable].[CurrentABCS]='A')
View 2 Replies
View Related
Oct 8, 2014
i have a table with 7 columns. Assume THE columns are a,b,c,d,e,f,g. In this table there is only one row and each column is given a number value. For example, a is 1, b is 5 and so forth. Can i make a pie graph in access with these 7 labels, and show there totals in the graphs?
View 1 Replies
View Related
Jun 5, 2013
Whenever I double-click a graph in a form that is being viewed it opens up MS Graph in edit form. This is confusing/ugly/etc and I don't want it to do that.
I tried adding some code to the double click event to make it do some other action (bringing up some graph modification tools I created), but as soon as those are closed MS Graph will then open up in edit form.
How to turn this off? It's incredibly unprofessional.
View 5 Replies
View Related
Sep 12, 2013
I'm trying to make a graph of Monthly profit and loss
I've got 2 tables: Invoices and Purchases.
Invoices contains the fields:
InvoiceTotal and InvoiceDate
Purchases contains the fields:
PurchaseTotal and PurchaseDate
I know I need to take one from the other to create my profit figure but what I can't figure out is how to incorporate the dates.
InvoiceDate and PurchaseDate might be different but both occurred in the same month, so I would like to sum my PurchaseTotal and InvoiceTotal during this month.
so the query I'm looking for would look like:
| Month | SumofPurchaseTotal | SumofInvoiceTotal | Profit |
I would then graph month and profit so my company could compare it's monthly performance ...
View 2 Replies
View Related
Sep 10, 2013
I've created an access chart to show total sales ordered by customers.
I'm using a form with 5 comboboxes to select 5 particular customers from a customer table and pass this information into a query.
This query is then used on a report to create the graph.
Finally there is a button on my form that prints this report.
My problem is that the chart displays the customers in alphabetical order and I would like to order the customers numerically based on total sales value.
If I change my query so that the total sales order by is ascending then when I run the query from the report I am asked to enter a parameter value for the total sales field. Entering nothing and pressing ok simply returns the same graph I would have got had I not changed the order option at all.
*The customer filed in the report is set to group by and my totals field is set to sum - but I need both of these set to produce the graph.
View 3 Replies
View Related
Sep 7, 2012
I have 2 tables like this
TableA
FromDate
ToDate
BatchType
TotalBatches
TableB
Date
BatchType
NumBatches
Is their a way to update the TotalBatches in TableA with the sum of NumBatches from tableB that have the same BatchType and falls between the FromDate and ToDate of TableA?
View 14 Replies
View Related
Sep 12, 2006
I am currently handling an insurance operation. I have 5 Sales Executives (SE) who receives certain percentage of commission for each sold insurance policy. SE receives their respective commission on a pro-rata basis. Meaning, if they give 4 equal monthly payment scheme to their clients, they will also receive their commission -- 4 times.
Example:
SE Commission for one sold policy is: 100.00. (Granted SE gives 4-month-term, SE will be receiving 25.00 monthly, upon cleared payment)
On my 2 tables lies the following fields:
[Table1]
SECom1
SECom2
SECom3
SECom4
[Table2]
CustPayment1
CustPayment2
CustPayment3
CustPayment4
Is it possible to automatically update Table1.SECom2 based on the figure on Table1.SECom1, once Table2.CustPayment2 is updated?
Thank you!
Sheila
View 2 Replies
View Related
Nov 20, 2007
Dear all, please excuse the fact that this is not an explicit problem I have, but more of a general query.
I have an Access database (2003) with a load of contact details in it. Including various fields for each contact, such as their email, services they offer, where they are, main contact name etc.
Some of these contact details will be out of date and I want to make sure that all the contact details are up-to-date.
I am in the process of setting up a mail merge with a Word document which will output to Word their relevant details, and this can then be e-mailed to each of the contacts with them to update and e-mail back again. Someone would then manually update each of the contact details.
This is quite a time intensive way of doing it, and I wondered is there a way of automating the process? I don't have the time to put the whole of their details on a website so they can update it over the web, but is there a way that access could possibly read the return Word document to automate updating their details? Or is there another easier way of doing it, without using word and using something else such as Excel or something.
If anyone has any experience in doing this kind of thing I would be really glad of some tips.
Many thanks
View 9 Replies
View Related
Oct 24, 2006
Hi
I have a table which has a date field in it, where the default value is Now().
How do I get this field to automatically update in the table to "today's date"?
Thanks
Maria
View 12 Replies
View Related
Jan 5, 2005
hello all
i have a problem, i have a form bounded to a query
that displays the books infos, in this form i have a list control
that displays the list of authos based on the code of the book
the problem is when i have more than one record in the opened
form ie more than one book and i move to the second record
the list doesnt change and displays the authors of the first book
when the form first opened
anyone has an idea how can the list be updated automatically when
i move between records
thanks a lot
View 6 Replies
View Related
Jul 28, 2014
why my vba code wouldn't work.I have a scorecard form, and what I wanted to do on a form was that if a user enters a number in a bound box (to a table), it would automatically update an unbound box. So I coded it as this.
Private Sub SupplierCorrectiveActionRequests_Enter()
If [Request] = 0 Then [Text30] = 100
Elseif [Request] = 1 Then [Text30] = 75
Elseif [Request] = 2 Then [Text30] = 50
Elseif [Request] = 3 Then [Text30] = 25
Elseif [Request] >= 4 Then [Text30] = 0
End Sub
But it throws an error that there cannot be Then if there are no ifs, weird.Another problem I had is that I'm using a continuous form, and whenever I scroll down there seems to be a visual bug,is there any way to do that without changing the theme?
View 5 Replies
View Related
Oct 26, 2011
I have created a parameter query that uses a combo box form. The people who will be using it when completed do not want to see the results in query form. Is there a way to have the query update a form or report without having to create and reformat each time?
View 13 Replies
View Related
Jul 22, 2014
I'm fairly new to using Access for any serious purposes. I'm trying to replicate some database functionality I setup in Salesforce and just trying to clear few core concepts in Access.
I'm messing around in the Contact Management template and I'm wondering how I can make it so when so when a yes/no checkbox field (called "Active") is ticked a date/time field (called "Last Date") is automatically set to today's date + 60 days.
In Salesforce I would create a Workflow Action triggered by an if Active = true statement, with a Field Update something like TODAY() + 60.
I can tell I need to create an After Insert/After Update Data Macro but can't quite figure out what to put in.
View 11 Replies
View Related
Feb 19, 2006
hi there
I am having some difficulty with using Access (aren't we all?) ;-(
I have a table with a the following fields: START_DATE, END_DATE, RENTAL_PERIOD, DAILY_COST & TOTAL_COST.
What I am tring to achieve is that when someone fills in the START_DATE, END_DATE & DAILY_COST fields (which update the table behind the form) that the form will take the END from the START and put the result into the RENTAL_PERIOD field and then multiply this by the DAILY_COST value to automatically fill in and display the TOTAL_COST field.
It must be simple but I just can't get it to work and it's stopping me from sleeping :mad: I have found myself doing Access in my dreams which is not good!!
Any tips much appreciated - Thanks
Mike
PS I have written 2 queries which will calculate this for me but dont seem to be able to action the queries from within the form (if that helps!)
View 3 Replies
View Related
Oct 24, 2005
Most likely a newb question, but how can i just update the date/time field to the current date, as opposed to constantly entering in the current date?
Thanks
View 1 Replies
View Related
Aug 3, 2006
I have a couple of drop down menus on a form i have designed which have values which are dependent on another drop down.
So, for example, when i select USA in country, the US$, appears in my currency box but i have to select US$ from the drop down when i want it to appear automatically.
Any ideas on how to do this?
Cheers
Also, i have a calcualtion attached to a text box:
[Text87] = (1 / [List93]) * [Combo85]
However, the calculation will not be performed, even on click, until [List93] has been clicked on. [List93] is a constant value and is a hidden field so how can i make access perform the calculation without clickin [List93]
Many thanks in advance
Cheers again
View 2 Replies
View Related
Oct 10, 2006
Hello,
I have a main form which has 2 subforms. The main form is the name of the Student. The first subform is the data entry form. It has 2 fields. One for the Trimester - a drop down which has "1, 2, 3" listed. And the second field is the benchmarks (again drop down). Now the second subform is a more elaborate way of viewing (only for viewing purposes) which standards have been chosen for which trimester. Now this form's control source is a Crossstab query, which updates the Trimester field for each of the benchmarks for the particular student.
Now my problem is I am trying to update this subform which is for viewing purposes only, automatically, so that the moment a benchmark is chosen on the other subform, the [trimester] field automatcially gets updated on this form. All the benchmarks are listed on this form (view form) and a field which is the trimester field. Data entry is not allowed in this form. So the information has to get updated automatically. It does when I close and open the form, but thats not how it should work.
I tried everything I thought possible (requery, refresh, a button to click) but couldn't get the form to update.
Please help! I would really appreciate if you could help me find a solution.
Thanks in advance
A
View 1 Replies
View Related