I have a form, containing a button that when clicked, it runs a query and displays the results in Pivot Table view. The query is set to display only results for the manager name selected on the form. So, when someone opens this database, they first select their name from a drop down box and then click the button to run the query. The query displays average call rate for equipment that person is responsible for. The only problem I am having is that if someone goes back to the main form, selects a different name, and clicks the button again, the query will not refresh. The query won't even refresh when I click the Refresh All button in the Ribbon. In order for the query to update, I have to first click the button to refresh the pivot table and then click the button to refresh the query. Is there a way to do these two steps through visual basic, so that the user doesn't have to do those two extra steps?
Right now, I am using the Docmd.OpenQuery code on my button.
I'm trying to use a PivotTable Form (in Access), in order to automate a process (previously data was exported to Excel and the pivot table was created manually). I've got my pivot table form working fine but I need to provide the user with a way to refresh the Pivot table - i.e. re-run the underlying query.
In Access Help it says to select design view and then click the Refresh button (the one with the big red '!' icon). This does work and the data is updated but it's not a user friendly option.
Opening the form doesn't automatically refresh the pivot either, so does anyone know a way I can provide a button with VBA code or whatever to manually update the pivot so it reflects changes in the underlying data?
Access 2010 doesn't seem to like the last line. It gives me an error saying the form name doesn't following access object naming rules.
Sub update_subform() Dim dbsCurrent As Database Dim qryD As QueryDef Dim strSQL1 As String, strSQL2 As String, strSQL3 As String Dim mytmp As String Dim proc As String, myot As String
How can I modify the code below so it will display all options (not just AMAZON and ARGOS) ? I don't want to mention all of them in Array because they may change in future.
I have a form built with multiple buttons. Once the user clicks the button and enters their parameter, I am using VBA to export the data to an excel pivot table. I would like to turn the subtotals to false so as the user clicks the check boxes in the pivot there are not any totals, subtotals, or grand totals. I am not sure how to add that to an existing query?
I have a form, a couple of comboboxes and text boxes on it. When these are filled out, the SQL of a query is changed using these parameters.
There are three subforms on the form, all pivot charts, all based on the query being changed.
The goal would be to update all three according to the user-given parameters.
Right now the subforms only update if I close and open the form, which is probably not the best solution, since it's too slow.
I've also tried to requery and refresh them, with no result.
Then I tried to overwrite the recordsource of the subforms with the same text that was originally there. This got them to refresh their data, but then all of the charts disappeared and had to be built again, so this is a no go too.
I have a table called "EquipmentRequired" which is populated by 4 append queries,
5000BaseReq, 6000BaseReq, 6000IFBBReq, EquipmentReq which get some of their information by counting fields in another table but all have the same field names.
The queries contain all data that is initially used to append new records to the table and this works fine.Unless some information changes or a record is added then I would like to add a button to a form and call it "update equipment" behind which would run a vba code firstly to delete all the records in "EquipmentRequired" table then run the 4 queries without the warnings and re-populate the table.
Is there a way to append a pivot table to a table or possibly make a query based on a pivot table? I need to get a count of Part Numbers and I need the average price for all these parts. Additionally I want to ignore a count of less than 3.
Also I am having trouble filtering on the count in the pivot table... haha, so I was gonna Query on it later on.
I have a need to display a pivot chart by clicking a button on my menu screen. At the moment my button will just display the query results and if I then click on View/PivotChart View my chart displays.
Code: Private Sub Command316_Click() DoCmd.OpenQuery "R06X - OOS Chart", avViewNormal End Sub
I have a problem with seting up color for my pivot chart. First I set up color I want(pic 1).but then when I use filter for End Customer all the colors will revert back to default settings (pic2).Is there a way how to force it so it sticks with colors I chose? VBA code?
I have a query that has a pivot chart, i need to be able to save this as an image so i can insert it into a html email but i cannot find anything, I am using access 2010 ...
I have a pivot chart in ms access and i want to have auto-axis for y-scale. I want that when the data will be changed the scale would be automatically arranged.
I've written this code in Access to create a pivot chart in Excel. All the code listed is good except for the last line. The last line creates another instance of Excel. I can't figure out what the correct syntax is.
Set xlApp = New Excel.Application xlApp.Visible = True Set wb1 = xlApp.Workbooks.Open("c:chi estpivot.xlsx" wb1.Sheets.Add wb1.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
What Im trying to do is create a query on the back of the one above which will have Problem Source in column 1 and then 2 more columns with their counts in them. So:
SELECT SearchCriteria.[Problem Source], Count(SearchCriteria.[Problem Source]) AS [CountOfProblem Source], Count(SearchCriteria.[Problem Source2]) AS [CountOfProblem Source2] FROM SearchCriteria GROUP BY SearchCriteria.[Problem Source];
I guess this is because it's filtering on the first Problem Source and then looking for non-blanks in the second Problem Source which isnt what Im trying to do!
I have a query I saved which pulls data and a form that creates a pivot table based upon the query.
Is there a way to create a query based upon criteria such as dates to limit my recordset? I'm trying to set date values in a form and update my saved query but I cannot figure it out. Any help would be appreciated.
Here is the SQL I use to create the standard query. What I plan on including through vb is a "Revenue_Date" variable "FROM" and "TO" date in the code to limit the output based upone the dates entered.
SELECT PARENT, TYPE, SUM(TOTAL) AS COMBINED FROM [
SELECT tblStmt_Tracking.Parent_Carrier_Name AS PARENT, '1. IND_Amount' as TYPE, IND_Amount AS TOTAL FROM tblStmt_Tracking INNER JOIN tblCheck_Log ON tblStmt_Tracking.Check_Assignment_ID = tblCheck_Log.Check_Assignment_ID
UNION
SELECT tblStmt_Tracking.Parent_Carrier_Name AS PARENT, '2. SBG_Amount' as TYPE, SBG_Amount AS TOTAL FROM tblStmt_Tracking INNER JOIN tblCheck_Log ON tblStmt_Tracking.Check_Assignment_ID = tblCheck_Log.Check_Assignment_ID
UNION
SELECT tblStmt_Tracking.Parent_Carrier_Name AS PARENT, '3. IND_Bonus_Amount' as TYPE, IND_Bonus_Amount AS TOTAL FROM tblStmt_Tracking INNER JOIN tblCheck_Log ON tblStmt_Tracking.Check_Assignment_ID = tblCheck_Log.Check_Assignment_ID
UNION
SELECT tblStmt_Tracking.Parent_Carrier_Name AS PARENT, '4. SBG_Bonus_Amount' as TYPE, SBG_Bonus_Amount AS TOTAL FROM tblStmt_Tracking INNER JOIN tblCheck_Log ON tblStmt_Tracking.Check_Assignment_ID = tblCheck_Log.Check_Assignment_ID
UNION
SELECT tblStmt_Tracking.Parent_Carrier_Name AS PARENT, '5. Licensing Fees' as TYPE, Licensing_Fees AS TOTAL FROM tblStmt_Tracking INNER JOIN tblCheck_Log ON tblStmt_Tracking.Check_Assignment_ID = tblCheck_Log.Check_Assignment_ID
UNION
SELECT tblStmt_Tracking.Parent_Carrier_Name AS PARENT, '6. IND Misc Expenses' as TYPE, IND_Misc_Expenses AS TOTAL FROM tblStmt_Tracking INNER JOIN tblCheck_Log ON tblStmt_Tracking.Check_Assignment_ID = tblCheck_Log.Check_Assignment_ID
UNION
SELECT tblStmt_Tracking.Parent_Carrier_Name AS PARENT, '7. SBG Misc Expenses' as TYPE, SBG_Misc_Expenses AS TOTAL FROM tblStmt_Tracking INNER JOIN tblCheck_Log ON tblStmt_Tracking.Check_Assignment_ID = tblCheck_Log.Check_Assignment_ID
UNION
SELECT tblStmt_Tracking.Parent_Carrier_Name AS PARENT, '8. Other Receivables' as TYPE, Other_Receivables AS TOTAL FROM tblStmt_Tracking INNER JOIN tblCheck_Log ON tblStmt_Tracking.Check_Assignment_ID = tblCheck_Log.Check_Assignment_ID
UNION
SELECT tblStmt_Tracking.Parent_Carrier_Name AS PARENT, '9. Unknown_Amount' as TYPE, Unknown_Amount AS TOTAL FROM tblStmt_Tracking INNER JOIN tblCheck_Log ON tblStmt_Tracking.Check_Assignment_ID = tblCheck_Log.Check_Assignment_ID ]. AS BREAKOUT GROUP BY PARENT, TYPE ORDER BY PARENT, TYPE;
I have set up a query to filter information between 2 dates using
Between [Start date] And [Finish Date] to filter the info. I'm using office 2003 which allows me to set various pivot charts based on this info with no problems at all. unfortunatly for me several other people are using office 2000 which doesnt have the same chart functionality. so i'm setting up another switch board with 2000 type charts. Right my problem as long as I dont have the Between [Start date] And [Finish Date] codes in my query I've produced the charts I require with no problems. As soon as I add the filter into the query when i go to edit the chart it comes back saying problems updating data. This I presume is because the query wants an input. Is there a way around this?????
I've spent hours searching for this, hopefully one of you can brighten my day!!!!:D
So I have a layout formulated in my head on how I want this to look but I'm really unsure of what all I need to setup to make this happen. I've never been fond of pivot tables and due to this don't utilize them much to know how to appropriately use it in this instance.
The attached pic file shows how I'd like the form to be setup. There will be fluff at the top that basically signifies what the record is (i.e. name of the jobsite). (A) is a drop down that will list a bunch of categories (bathroom, kitchen, laundry, etc.) Upon selecting that it will populate (C) for the subcategories relative to the main category (A). (C) is a list of part names that are associated with (A). The Column heading (B) is the Plan number which there can be 3 different plans or 5 different plans. The inside data (D) is the count of each part (C) used in each Plan (B) (i.e. 2 sinks in Plan 1, 3 sinks in plan 2, etc). Listed right below that number I want to link a picture (E) showing what that, for example, sink looks like.
So I'm not sure which tables need to be created to make this Pivot Table work. I know it's not an easy solution but if someone could take a little time to help me figure it out I'd appreciate it.
I have a pivot table which I want to associate with a table in my access database. The problem is that when I try to associate it at design time, it gives me an error saying that the database is locked and I cannot access it.
I am using access 2003. Is there any solution to this problem....like making the database unlocked. If not, I wil have to create another database with the same table which seems crazy to me.
I have an close button on a form that is supposed to Refresh the subform of a different form and then close the form with the close button.
frmOperations - no refresh / requery subfrmPlants - Needs to be refreshed / requeried
frmPlants - Needs to be closed
Currently the button effectively closes frmPlants, but it's failing to refresh the data on my subform to display any changes that have been made on frmPlants. I've tried with refresh and requery, neither seem to work.
Code:
Private Sub lblClose_Click() If CurrentProject.AllForms("frmOperations").IsLoaded Then Forms!frmOperations!subfrmPlants.Form.Refresh End If
DoCmd.Close acForm, "frmPlants", acSavePrompt End Sub
Hi, I hope someone can help me. I have a database as thus:
Several tables ->appended together using 'union select' into a query called 'sheet1'-> information that is coded converted via linked tables in a query called 'sheet2'
'Sheet 2' looks completely fine - it works dandy but when I try and run a pivot table not all of the values in one column that should show don't even come up as an option.
The values that are missing on the pivot report do actually exist in the query that it is running from.
There are no filters on and Pivot tables work okay on the origional tables.