Subtotal Row Formatting

Dec 2, 2004

Hello,

I have a code in my 97 Access db that exports a query in Access to Excel. The code also includes all the formatting needed for the Excel sheet including subtotal rows. What I would like it to do is automatically format the subtotal rows to be a different color so they stand out. This is part of my code:

xls.Cells.Select
xls.Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(13, 17), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True

Since the data changes continually I have no idea which rows will have the subtotals.

Is there some code I can insert in my export code to automatically color or highlight the subtotal rows?

Thanks in advance for any help.

Elizabeth

View Replies


ADVERTISEMENT

SubTotal Query

Jun 19, 2005

Hi All,

I have been searching through the forum to see how I can do a query that does subtotals, but to much to my avail there has been nothing that specifically answers my question. So here it is. If I have two tables say one called A and the other B. Now in A there are two fields that I want to use and these are item and quantity (The quantity is the number of that item). In the other table I want to use the field rate. Both tables are related by the item. How do I do a subtotal query that gives me the subtotal for an item i.e. rate * quantity, and shows the information in the specific format:

item : quantity : rate : subtotal

Thanks
Greg

View 1 Replies View Related

Form Help (Subtotal)

Jun 28, 2006

I have a form with a control "TypeCode," it's set to:


=IIf(Year(Date())<=Year([date]),[qryVacation.TypeCode],"Other")

So that if the date on the form is less than the current year, the control will return "Other" in the box.

At the bottom of the form, I have a subtotal:

=Sum(IIf([Typecode]="Sick",1,IIf([Typecode]="Half Sick Day",0.5,0)))*8

This helps tally Sick day and Half Sick Days for me, but if they are a year old, then they should not be counted. Once I got the field to say "Other" I thought I was home free, but it is still counting the sick days.

I know it's probably still getting the value from the qryVacation, but how do I have it so it just subtotals off the form iteself?

View 1 Replies View Related

Subtotal On A Form

Aug 15, 2006

I have a form were I got the corrent fields:
date, account, ammount; the account field is a numeric field. What I am trying to do is to have a extra field on the same form wich will give me the total ammount for the relative account as soon as I have inserted the 3 data. What I don't knowis if I need a query to extract all the ammount for the relative account shown on the field "Account" or it can be done in a easyer way!!!

View 4 Replies View Related

How To Run A Subtotal And Ranking Query

May 27, 2005

Have a table containing a column called "BOC" (Budget Object Code) that contains approximately 85 different 4 digit codes, with one selected for each row. (See sample below). Table has 30,000 rows of data. What I need to do is run a query that will give me a subtotal dollar amount for each unique BOC, and then display the results in descending order for both Obligations and Expenditures. Any ideas??

Sample Data:

COST CENTER BOC OBLIGATIONS EXPENDITURES
119900 2670 1000.00 500.00
119901 2685 2000.00 1000.00
119999 2670 5000.00 2000.00
119920 3130 5000.00 5000.00

View 1 Replies View Related

Running Balance / Subtotal

Nov 12, 2007

Hi

I haven't been on for a while. so hello everybody.

I am trying to keep a subtotal in a table. there is an index (actually its formatted text, but its a number and i can converted i.e. cdbl()). I was thinking that i should create one query with dmax in one column and and then use another one to show the value plus the previous value.

can anybody help me out please?

thanks,

Sam

View 6 Replies View Related

Calculating A Subtotal - Should Be Easy?

Aug 2, 2005

Hi all,
I have a subform within my form for quotations (see attached).

A user will manually type in "Repair Cost" and "Accessory Cost". The subtotal field is calculated using this expression =Nz([Repair Cost])+Nz([Acc Cost]) in the Control Source box
This is all Ok.

I want to subtotal these on the main form then work out the VAT and final total.

My problem is, No matter what expression I seem to use on the main forms subtotal, it will not work.

Here is an example of what I have tried:

=Sum([SubTotal])
=Sum[Forms]![TblQuotation subform].[SubTotal]
=Sum[TblQuotation subform].[Form]![SubTotal]

Nothing seems to work. :confused: Any pointers would be greatly received. Many thanks.

View 7 Replies View Related

Subtotal Data In Access Problem

Mar 7, 2008

Hi,
I am trying to work out away of subtotalling a field in access, similar to that of the subtotal function in excel,
Basically my table is structured so i have a store number column and a transaction number column so as an example my data looks like this:
Store noTransaction Num
1234522664499
1234522664499
1234533775599
1234533775599
1234544886600
12345611227755
12345622449955
12345677556699
The transaction number is made up of several other columns and basically represents an item sold by an assistant at a certain time - if the asst sold 2 items i will get the same transaction number appear twice, if they only sold 1 item it will only appear once.
I want to be able to count the transactions by store so i end up with a result like this (based on the above data)
Store no Count of Trans No
12345 3
123456 3

Can anyone help?

View 2 Replies View Related

Creating A Invoice Subtotal Totals Etc

Oct 24, 2007

i was wondering if there is any easy to follow information anywhere or examples with how to do..Specifically on creating an invoice??

The form would need customer details then a subform with the qty, price per unit, extended price then a section on the form which works out the subtotal adds it to freight charges
then gst and finally the total.These all automatically then being placed in there appropriate tables..i Managed to figure this out once before but i cant for the life of me figure it out again..I have spent weeks trying any clues???

View 1 Replies View Related

Modules & VBA :: Subtotal Based On Month Not Day?

Oct 4, 2013

I have created some subtotals in some columns of data which for example are the dates, names, and amounts of invoices.

The code I used is:

Range(Range("C1"), Range("C1").End(xlDown)).Select
Selection.CurrentRegion.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(3)

This is working of sorts but it is giving me subtotals based on the day in the date column. How can I change this to group by the month?

View 10 Replies View Related

Reports :: Subtotal By Date Range

Apr 3, 2014

I have a set of records that contain the following attributes;R_Name, Cost, StartDate, EndDateI need to subtotal the cost for each R_Name by year. The start and end date attributes can span several years and I need the correct cost for partial years.

View 5 Replies View Related

General :: Subtotal On Subform Saving To Table

Jul 17, 2013

find the attached MS access DB for INVOICE printing . I am facing two issues there .

1. {form INVOICE } sub-total must be Calculated from line total on {INVOICE DATA Subform} , I know this can be accomplished by adding a new field at sub-form and calling that value to main form's sub-total field .

2. And the real issue is i want to save this value from subtotal on form INVOICE to table field name subtotal .

3.I wish to make a reporting format for each INVOICE NUMBER , whenever report is being generated , the report shows more than 1 invoice details .

View 2 Replies View Related

Create A Query That Will Return Subtotal For Order

Nov 16, 2013

I have set up a basic database that has a customer table , orders table , join table and products table. I have created an invoice form that has customer details and then in a subform has the order ID and product ID , name , price and quantity.I have a text box on the form to which I am trying to output the sub total to when the form is launched(quantity X price for the current order).I was trying to create a query that will return the subtotal for an order.I had the query calculating the subtotal but I was then trying to get t the cost based on the order ID. I was then attempting to get the Order ID for the query from the open form by adding this to the criteria in the query:

[Forms]![Invoice]![invoicesubform].[Form]![Order ID]

I was then trying to use Dlookup to put the result of the query into a subtotal text box by using:

=DLookup("[cost colum from query entered here]",[the query name was entered here]")

View 1 Replies View Related

Reports :: Stop Subtotal From Adding Detail Lines

May 16, 2014

How to keep Access from including the detail line items in my report total?

Below is a quick image of part of the report.

The report is compiled from two tables. The first table has detail information on each line, in four columns:

State Name Amount Quantity (Not used)

AL Store 1 313.94 60
AL Store 2 12.59 1
AZ Store 3 576.45 90
CO Store 4 172.22 24
CO Store 5 502.25 88

The 2nd table is a summary by state with three columns:

State Amount Quantity (Not used)
AL 326.53 61
AZ 576.45 90
CO 674.47 112

I'm trying to make the report group by state, then name, amount and a subtotal for each state. This all works fine in the report.

I want to also add the amount field from the 2nd table (State Subtotals) to the report just for reference. I've managed to make this work as well. (See State Total on image)

The problem that I'm having is that when I try to do a final total of the State Total column in the report footer, it seems to add the (State Subtotals) amount field on every detail line (See red numbers in picture. they are not actually on the report, but Access thinks they are and includes them in the final total).

So far I've tried different joins, hiding various fields, sub reports, ect. I just can't figure out how to stop Access from calculating the detail lines.

View 2 Replies View Related

Forms :: Default Formatting Option In Conditional Formatting Dialog?

Aug 1, 2014

Need to confirm whether the Default formatting option in the Conditional formatting Dialog won't work in datasheet view of a form. Please note that all conditional criteria are working fine but not the Default Formatting option - only in the Datasheet view (In Single Form view the default formatting is working fine)

View 11 Replies View Related

Modules & VBA :: Subtotal Data Access To Excel - Range Class Failed

Jun 6, 2014

I'm trying to subtotal data in an excel file but I am getting a subtotal method of Range class failed in the red text below. I have been trying to get this to work with no success.

Code:

Public Function SUMMARY()
Dim xlApp As Object
Set xlApp = CreateObject("Excel.Application")
With xlApp
Dim wb As Object

[Code] .....

View 3 Replies View Related

Forms :: Calculate Subtotal On Subform And Display On Upper Subform

Jun 20, 2013

im having problems getting a subform to calculate another subform's total and display it as it keeps coming up with the #NAME?.Basically my database is like this

tblCustomer
- tblOrders
- tblItems

and this is displayed on a form. so you can flick through clients, then flick through the orders and its broken down into the items inside each order.i have seen many answers that are only about calculating something on a subform and displaying on a form but this does not work when displaying on a 'parent' subform. the form structure looks like this

frmCustomers
- sFrmCustomerItems
- sFrmCustomerOrders

i have a calculated control textbox in the footer of sFrmCustomerOrders with sums up all the prices using =sum([Price])and in my sFrmCustomerItems, i have a field called Amount (the total amount of all the items) and the Control Source formula i was using was =[Forms]![sFrmCustomerOrders]![sFrmCustomerItems]![txtTotalPrice] but i get a #NAME? error.

View 5 Replies View Related

Tab Formatting

Apr 13, 2006

Really simple one for all you folks out there, but I've just been struggling for 20minutes and thats it I've decided to to seek proffesional advice. Though its been said I need it in other areas of my life too (so my ex says but..), any way I digress.

I put a tab control on a form all I want to do is format the title of each individual Tab name, i.e. font size etc, type. Had a look at the properties but nothing there seems to register.

Is it possible?

View 6 Replies View Related

Tab Formatting

Apr 20, 2006

Hey do any of you guys know if its possible to change the colour of the tabs or set them as transparent in a form plz??? I know you can set the background as transparent, but i dnt know if you can do that to the actual tabs.

Thanks guys

Zaf

View 1 Replies View Related

Formatting..

Jul 20, 2005

Ok, don't know what I should title this problem as, but maybe you guys can help. The data stored on my table is formatted as Currency, however, when I Queue up the data, I also multiply it by a factor (exchange rate). Which turns the data into just a regular number. When I display this data on my form, I reformat it into Currencies again. However, when I click on the field, it shows the number in its raw format. How can I fix this so that when the user click on the field, they won't see the raw number but just regular Currency format? Much thanks in advance.

View 9 Replies View Related

Help With Formatting

Feb 5, 2007

Hi,

I am creating a database of private equity funds. I want to have a currency field for an input entitled fund size. However, I need to be able to display whether the size of the fund is in dollars or euros. How can customize a number/currency field to allow me to input the correct currency symbol?

Thanks

View 2 Replies View Related

Formatting

Nov 8, 2006

Hi
I have a database with multiple tables all linked together in various ways. I would like a master reset button that will delete every record in every table as well as resetting the auto number(s) back down to zero again. Can this be done and if so, how?
Thanks in advance.

Dave

View 9 Replies View Related

Help With Formatting

Mar 11, 2007

I'm trying to format a header in a report and need some help.

The following results in "Error" if placed as the Control Source :
=IIf(IsNull([Captain]),"","Captain:" & [Captain])

Is there another way to do this?

Essentially, I want to display the word "Captain: " followed by the name if there is an entry. If there is no captain, I want to display nothing.

Thanks for the help!

View 1 Replies View Related

Formatting

Aug 24, 2007

In my report the data shows patients and which unit they are in so in the detail section it shows something like this depending on how many records there are:

CVICU
CVICU
CVICU
MSICU
MSICU
NICU
STICU
STICU
STICU

I'm now modifying that report to show totals and I want to list the names of the units going across the page not down the page which shows all the records. I moved the field into a "Unit Footer" and now the report shows only one entry for each unit like this:

CVICU
MSICU
NICU
STICU

Within the Unit footer section I don't want the names of the units going down but across like this:

CVICU MSICU NICU STICU

I know there must be an easy answer but I've looked and work on it for so long I can't see what it would be. Any help would be GREATLY appreciated.

Thanks so much in advance.

View 3 Replies View Related

Formatting Due Dates

Apr 20, 2006

Hi,
Please see attachment. I have created a mini database which will hopefully help me in explaining the process.

Table1: Field1 - 8 rows/8 records

Form1: Field1 text box
So in this box I used conditional formatting to say- whenever the date is greater than 04/05/2006, turn red.
So now I scroll to record2, need to have new conditional formatting rules to apply to this record.
My understanding is that I can use the remaining 2 conditions for records 2 and 3.
But what about records 4,5,6 & 7.
For example in record 4 I need the date to be greater than 02/15/2006, and record 8 to be greater than 05/09/2006-and as you can see when you scroll down to record 8 it has already turned red because it is governed by the rules in record1!
Hopefully this makes sense!
Is there a way to get around this? Is conditional formatting the only way to achieve this?
If it's not what would I do?
Thanks in advance for your help!

Jcwishart

View 1 Replies View Related

Formatting A ZipCode

Sep 7, 2005

I am having trouble formatting a mailing label zipcode using the xxxxx-xxxx format.

I am using the =Trim([City]&","&[State]&" "&Format([ZipCode],"@@@@@-@@@@")) for Access 2002

My program is Access 1997-is there a different formula and why isn't the above working?

The zipcodes that have an extension come out right but the ones that don't have an extension come out like 6-8894

Any help would be appreciated!

View 3 Replies View Related







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