Queries :: Totals Sub Report Does Not Display Currency Formatting
May 28, 2015
I have a main report with 5 sub reports. There is a detail page for each company and a totals page at the end. The record source for each sub report is a Union query (combines the detailed information with the total information.
One of the sub reports displays currency amounts. The detailed reports display the currency correctly: $26,001 (no cents). The totals sub report does not display the currency formatting: 468934
When I run just the totals query the amounts display correctly ($468,934) by using the CCUR(TotalAmount) variable type conversion. The VarType for the amount field in the totals query is 5 (double precision).
When I combine the detail query and totals query into a Union query the detail amounts display correctly but the total amount is missing the formatting.
Here is the union query.
SELECT TblCompany.TblCompanykey, FormatCurrency(ProviderCostsRetrieval([TblCompanykey],1),0) AS TotalCost
FROM TblCompany
ORDER BY TblCompany.TblCompanykey
UNION ALL SELECT 9999 AS TblCompanykey, CCur(Sum(([QryRptProviderCostsDuringPeriod.TotalCost]))) AS TotalCost
FROM QryRptProviderCostsDuringPeriod
GROUP BY 9999;
The data within my tables is formatted correctly and when I run a standard query on the data, it comes through the query with the same formatting. However, when I run a query that needs to total the values (whether it's sum or average) the values lose any formatting (and by total I mean the one in design view, not in datasheet view).
I then need to manually format each columns "Format" and "Decimal Places" properties to what I want. I have quite a few queries with quite a few columns, so this is very time consuming. Is there a way to do this faster without VBA? In Excel I can simply highlight multiple columns and format all of them or apply a format painter. I don't see any similar functionality in Access 2010.
I have monthly reports developed from various query's and what I want to do is have a single report that I can display my monthly totals from each monthly report without developing a whole new report. I want to use the existing totals from the monthlies and have them all on one report. Can anyone help me? Jaxfire
I have some columns with hours. I want to simply display the total below each column. I would like to do this in the query results and in the reports that I create.
I have a database which has a table for the quotes prepared, each record has a quote amount. In a query linked to that table I have the ability to get just a specific month view which shows all totals in that month. I want to calculate a grand total for the amounts shown in quote amount:
Record 1 : 100.00 Record 2 : 100.00 Record 3 : 50.00
Grand total : 250.00
Then I want to display this grand total on a form which is visable on a screen based in the office that has an auto refresh on it so after 2 minutes any new records added to the table will increase the grand total on the form on the screen.
I have worked out how to do the totals bit, but now I need getting this figure (I.e. 250.00) on a form without having to run the query and have it looking in the background.
I have an unbound text box (txtInstAmt) that needs to be displayed from a table (tblLoan.fldInstAmt). Both the fields in the table as well as the text box have been set to Currency.
However, my code doesn't seem to work.
I get an error msg saying that the value isn't valid for the field when I set the decimal places to 2 in both the table and the form. When the decimal places are set to Auto, I get a Data Type Mismatch.
Can someone please tell me what's wrong with this code?
Code:Private Sub cboLoanSN_AfterUpdate()Dim DAOdb As DatabaseDim DAOrs As DAO.RecordsetSet DAOdb = CurrentDb()Set DAOrs = DAOdb.OpenRecordset("Select * from tblLoan where fldLoanSN='" & Me.cboLoanSN & "'")With DAOrsMe.txtInstAmt = .Fields("fldInstAmt")End WithMe.cboDateRepay.RequeryEnd Sub
Hi everyone, My query concerns Currency in that i have declared some variables as Currency but when i try to output them they appear only as if they are formatted as numbers i.e. £0.50 as a currency variable when displayed in a MSgbox displays as 0.5 not a big problem you might think but i am trying to output these numbers to a retail printer as part of an Epos application. i can add a £ sign to the beginnning but adding missing zero's to the end is proving a little more tricky. I have cheked that the international settings on the PC are set to English, £, 2 decimal places ETC Thanx
I need to have a textbox formatted to have 2 decimals. If I take general number and set the decimal to 2 it will display numbers like 89.1. I would need it to be 89.10. I would like not to use the currency format as it puts the $ symbol in the textbox as well. So basically same formatting as currency (because it's a currency I am working with) but without the symbol.
I have a parent form and a sub-form. On the parent form is a date field [JOINED] and on the sub-form there is a date field [DATE PAID] and a field [BQ JOINING FEE] with a default format of currency.
I created a macro to set the value of [BQ JOINING FEE] to 0 if ([DATE PAID]>[JOINED]+60). It sets the value to 0 as required but I am unable to get it to format the result as currency.
This is my first post so can I just say how great and useful this forum has been for me since I joined! I have found pretty much everything I have wanted without having to ask, so thank you everyone!
I am only beginning with Access at the moment, as I try to implement some improvements to the way my company works!
I have one really simple, but annoying issue at the moment and I cannot find the answer anywhere!
I have a currency filed in my table. I want to format it in USD, but USD is not available in the format options, just £ and €. I cannot see where the hell I get the USD $ format from?
I know this is probably well simple and I am being a plum!
I have a calculated field in a query that generates a result that i need to display in forms/reports with the $ sign but zero decimal places (ie; rounded to the nearest $ value, $5).
If i use the sql format currency function (format (n, "currency",0) it always displays the $ sign but with two decimal places...
In the form/report text box property i set the format to currency, with the decimal places set to 0, but it still displays two decimal places (this property setting seems to make no difference other than displaying the $ sign). Is there something i am missing regarding the way access formatting works?
I have some Conditional Formatting of a Currency Field in an Entry Form. The cell is conditionally formatted with a yellow background when the value is zero.
I now wish to add an additional condition to the expression such that even if the value is zero it will not be formatted if a specific check box is TRUE.
I have tried modifying the expression such that it reads;
[currency field]=0 AND [check box]<>TRUE.
It correctly turns off the conditional formatting if the check box is ticked, but does not turn it on again when the check box is unticked.
Where the Pay field contains the rate of pay in pence.
This then displays the value in the following format 15:00 what I would like to do is have this value displayed as Currency it makes no difference if I set the format to Currency is there a was to have it displayed as currency ie, £15.00 any help would be appreciated.
I have a problem displaying the £ sign in my query. Instead of the query displaying £448.87 it displays 448.87.
You can see from the below image that the value of AllCost is £448.87 and I don't understand why its displaying 448.87 when I run the other query called All Cost 2. The Nz function is used to display £0.00 if the AllCost field is null.
In my form I would like a text box to display the two combined i.e. £10.000.00 (83.33%). At the moment it displays 10000 83.3333333333333. I can use £#,##0.00 to format the current half, but how can I then format the percentage to display 83.33%?
What I am trying to do is have the user click a button to open a report based on the current specification they are updating. Now for each specification there are multiple revisions so i added a 'revision history' table. When the user prints the specification, I only want the latest revision number, date, and rev descr to show. I tried using the following:
Private Sub Report_Load() Dim db As Database Dim Rev As Recordset Set db = CurrentDb() Set Rev = db.OpenRecordset("SELECT tblRevisionHistory.revnum, tblRevisionHistory.revdate, tblRevisionHistory.revision FROM tblRevisionHistory;") Rev.MoveLast Me.Text23 = Rev.Fields("revnum") Me.Text26 = Rev.Fields("revdate") Me.Text28 = Rev.Fields("revision") End Sub
The above only showed me the last record in the table regardless of the specification number filter.
I've done this once entirely by accident and can't seem to duplicate it...
I have a report. It has the following:
Report Header: Logo and title Department Header Supervisor Header Group Header Detail Department Footer: Totals Report Footer: Overall Totals for all departments
Here's my question. I have combo boxes on my main form that filter this report. The combo boxes are referred to by the query that runs the report. How do I get proper unfiltered overall totals in my report footer?
I have a form, with a sub-form, from which a call a datamacro to calculate totals(from the same table as the control source of the sub-form) and then want to display the totals on the parent form!! The RETURNVARS all have the correct total values, but i cant assign them to a control on the parent form!! none of the controls are recognized when i try and set the PROPERTY VALUE to the totals? (spellings are definitely correct)...
how to change default currency in Access 2013 to a "foreign currency" (i.e. to Indonesia Rupiahs) without changing control panel (Region/Language>currency) - now setup as USA ($US)?
I'm using Access 2010. I set up conditional formatting in some areas of my report. They're very simple like if a cell is between 0 and .4, then the background color of the field is red. They work just fine...when I click on the field. I don't remember ever running into this issue in the past. I've been reading potential solutions on the web, but haven't found a way to make the conditional formatting rules kick in when the report is loaded.
this is going to be kind of hard to explain...but here goes:
i have some values grouped in a header on a report. I need to be able to get totals for these values within the group... here is what i tried:
i created a new textbox, set the control source to equal the textbox i want to total up, and then set the running sum of the new textbox to "over group". this gives me the right result, however I only want the new textbox to be visible at the end of the group. so now what i essentially have is a textbox that keeps a running sum of another textbox...
how can i make the textbox only visible at the end of the group? i tried the "on retreat" event for the group so that it will make the textbox visible at the end of the group, but it didn't do anything. i'm not sure what "on retreat" does, but i guess it's not for that.
anyone have any clue as to how this can be done?? just to clarify, this is pretty much how i want it to be set up
the text60 etc are the name of the field with the sum function in.
I have these placed in the work date footer and they total up the colums ok.
What I need to do it add the Total Hours + Holiday hours + Sick Hours in the report footer to give me a total hours to pay then I will need to multiply this value by a Pay Rate.
I am trying to add hours entered in a short time format. For example 08:15 or 02:55. I also would like it to give a total number of hours beyond 23:00. Here is a table with a Name Column and Hours Column
I have a report that shows property address in the address header. Then lists in the details all work done at that property.
I need to total the number of properties we have worked on. The problem I am getting is if we do two jobs at one property then the total property worked on number is increased by the extra job done at that property.
I am using the following in a text box on the report footer: =Count([houseno] & " " & [streetname])
Hope someone can give me a clue where I am going wrong.
In my Access forms, i display data by month wise; and i want to give the conditional formatting with two condition;
If date of today is greater than target date for that month and if got value more than 0 - Red color If date of today is lesser than target date for that month and if got value more than 0 - green color
Target date for every month in available in a separate table.