Move Crosstab Total To End

Nov 3, 2005

I created a crosstab query that I'm using to dynamically create a form. I know how to create a total in a crosstab query but it creates it before it creates the columns. I need the total column to show at the end of the columns. Does anyone know how to do this?

View Replies


ADVERTISEMENT

Sort On Total Field In CrossTab Query

Jan 11, 2007

Below is the sql code I have for a CrossTab Query. Total as GrandTotal
shows GrandTotal of all weekly columns. Is there anyway I can get the
Query Display to sort on the GrandTotal Column?

PARAMETERS [Forms]![Queries_ReportsFRM]![StartDateTxt] DateTime, [Forms]![Queries_ReportsFRM]![EndDateTxt] DateTime, [Forms]![Queries_ReportsFRM].[FaultCategory] Text ( 255 );
TRANSFORM Sum([Trends-1-3TON-WEEK].Totals) AS SumOfTotals1
SELECT [Trends-1-3TON-WEEK].SystemGroup, [Trends-1-3TON-WEEK].FaultCategory, Sum([Trends-1-3TON-WEEK].Totals) AS GrandTotal
FROM [Trends-1-3TON-WEEK]
GROUP BY [Trends-1-3TON-WEEK].SystemGroup, [Trends-1-3TON-WEEK].FaultCategory
ORDER BY Sum([Trends-1-3TON-WEEK].Totals)
PIVOT [Trends-1-3TON-WEEK].YearMonthWeek;

View 1 Replies View Related

Queries :: Self-Referencing Running Total Used To Calculate Next Total In A Query

Jul 23, 2015

I am trying to create a query that has a self referencing running total based on the values (point totals) of itself (running total of values in the running total column that have already been calculated for all previous records) plus the total of new points being added in the current record, less the total of points being removed in the current record. This running total can never go below 0, if it does, the running total should restart at zero and add in only new points and begin the process again with the next records

I am able to do this in Excel in less than two seconds so I know there has to be a way to port this into a query. I've attached an excel example of what I am exactly trying to do

If it takes multiple queries to complete the required output I am ok with it. In my previous outtakes I have had up to 8 queries but just couldn't seem to do it..

View 9 Replies View Related

Crosstab Query Based On Crosstab??

Sep 21, 2007

Hi all, I am utterly unsure if what I want to do is even possible:

I have two crosstab queries, qryRewCOCredit and qryWrapCOCredit which show the changeover (CO) times for the specified machine when they are NOT zero. (all zero entries don't show up).

There are many cases when there is a CO for the Rewinder on a specific day, but not for the Wrapper, and vice versa.

I want to make another crosstab query which performs a calculation. To keep it simple:

If (RewCOCredit>WrapCOCredit) Then
5-RewCOCredit
Else 'WrapCOCredit>RewCOCredit
5-WrapCOCredit

Please help!!!

View 2 Replies View Related

Total Daily Sales Queries By Model/Total

Mar 8, 2008

Hi,

1) I am pretty newbie to this access programming, do forgive me if my questions sounds stupid.

2) Basically I create an application in access capturing or production information for my company. now the top management suddenly wanted whats their main concern:- Total Daily/Monthly, Quarterly, Annual Sales (By Model If possible)

3) I start with daily (Lets don't be too overly ambitious).

4) I try to let user select dates from my calender control and reflect daily sales (in Total & By Model break down) insert into my form.

5) Understand someone told me from my previous post in Calender control I can achieve it either through forms or queries, which is a better way. (in terms of flexibility to change for program maintenance/ scalibility) wise ?

PS: Please forgive my ignorance :o:(

Thanks (In advance) & God Bless.

View 2 Replies View Related

Tables :: Get Total Of Clip Size And Also Total Of Clip Duration

Dec 31, 2012

I have a table with 4 field which describe clips.

ClipName (txt)
ClipSize ( Long Integer)
ClipDuration (HH:MM:SS)
Date created (dd/mm/yy).

I would like to get the total of ClipSize and also total of Clip Duration either in table down or in query.

View 13 Replies View Related

Move DB

Aug 21, 2007

I need to move my database from one computer to another and will need to put it on disk first. I have user serurity on the DB. Should it be ok as long as I put both files (the Db and the security) onto the disk and transfer them both?

Just asking as I cannot copy to CD from my computer and will have to put a request in so dont want to have to keep going back.

View 2 Replies View Related

OK - Move HELP!

Jan 10, 2006

hiya all! i need some help!

i want to make a button on my "Calls" database form, to move all "Finished" calls (calls that have been declared as completed), into a "Finished Calls" table.
I have half of it working - i have a button that DELETES all 'Finished' calls. However i now need them to COPY into my "Finished Calls" table... is it an Append Query i need?

the code i have now is as follows...

SELECT * INTO Table2
FROM Table1
WHERE Finished='Yes';

thanks in advance!
johnny

View 5 Replies View Related

Move Up And Down

Nov 16, 2006

Hello all

Got a question that I've never seen done in Access....
I have a DB I'm creating that creates pickup runs....(guy goes out and collects stuff) I'll need to get a subform showing the run items and be able to move them up or down according to the way in which the driver is going to do the run

Any ideas guys?
I've got no idea where to even start

View 4 Replies View Related

Move Records

May 6, 2005

is there a way by which i can move one or more records from one form to another when clicked on the 'YES/NO' button ??? :confused:

thanks in advance.

View 5 Replies View Related

Move To SQL Server

Apr 20, 2007

I'm planning make a move from Access to SQL Server.
To be honest I never used it before, but I told to my bosses that I'm a Gooroo in it.:)
So can you guys give me an idea if it is really hard to make a move, to upload the existing databases and to get used to it.
How long it takes?
What books would you recommend?
Or what forum?

View 10 Replies View Related

Move From One List To Another

Dec 11, 2006

Hi all

Currently i have this setup

Listbox1
Rowsource: SELECT PREC FROM PNum;

I have created a Listbox2

What id like to do is move the selected items from Listbox1 one to Listbox2

Is there any simple way to do this? I'v looked around and found some examples, but they seemed too complicated for a newbie like me.

Thanks in advance!

View 2 Replies View Related

Move Value Problem

Apr 5, 2005

I have a form that has two fields. now when i click a button i wnat to bring those two values to another form, so less typing for the user. Now i did this before with the close event with a populate function?

I have two forms one: CFR second: New
CFR Fields: cfr_ehpid, cfr_ offsett

i want to bring those two feild values to the from new in feild5 and field 6
so when the user clicks the button it will open the form new and take the values from cfr and place them in feild5 and field 6??




Heres my code:


Private Sub Command359_Click()
Dim strblank As String
Dim strdesc As String
CFR_EHPID.SetFocus
strblank = CFR_EHPID.text
CFR_PATOFFSET.SetFocus
strdesc = CFR_PATOFFSET.text


strdesc = strdesc
Form_History.Text5 = Me.CFR_EHPID
Form_History.Text169 = Me.CFR_PATOFFSET
DoCmd.OpenForm "History"
Exit Sub
End Sub

View 1 Replies View Related

Please Help! - Move AfterUpdate

Aug 19, 2004

I know what I want to do...but have no idea how to get started! I'm new to coding and using macros and quesries doesn't seem to help.

When field [TermDate] is updated with a value, I want to move the record from table [BadgeData] to table [Termed]. I'm sure this is easy for someone who'll be willing to throw out a few suggestions.

Also, is there anywhere in the code builder that will help identify what code (or commands) do? (Does that make sense?)

View 5 Replies View Related

Move Records Between Tables

Nov 22, 2005

hiya, im new to this sql scene..!

i have an MS Access db containing a few tables of 'calls recorded' and 'finished calls'.

(i want to move all 'Finished calls' to a seperate 'Finished Calls' table)

anyway, the thing i want to do is to move records from Table1 to Table2, i am able to do this using the following code...

SELECT * INTO Table2
FROM Table1
WHERE Finished='Yes';

this code does work, however it does not delete the records that were moved out of Table1 - they are still there, its more or less copying and pasting them..

any help would be much appreciated!

View 14 Replies View Related

Move A Record To Another Table

Sep 8, 2006

ok ive read some responses to people having trouble or need to know how to move a record from one table to another...
i have two tables. One with member and another with thier siblings.
i have two forms. one with the member details which contain a command box to open the other form for their siblings. the siblings form is a tabular form so when i double clikc the siblings form i can all the children but when i open it from a specific member only their children are shown.
each member has a memberID (primary key). but the siblings have the same ID as their father(member)

i have put a commmand box in the siblings form next to every sibling. what i want is that when i click this button the record moves to the members column.

i only know the very basics of VB...so a step by step explination would be helpful...

this is very specific and if more information is required please ask here or ask for my msn address.

Thank you in advance

View 4 Replies View Related

Move Queries From Mdb To SQL Server

Apr 21, 2007

Hi,

I know how to move the tables from mdb to SQL Server.
But, how can I move all the queries from mdb file to SQL Server?

View 2 Replies View Related

Can't Move The Focus To The Control

Nov 7, 2007

Hi

I am trying to write simple code that undoes entering a new record and moves the focus to a mandatory field. I wrote the code below; however, I get this run time error message each time I run it.

DB can't move the focus to the control PlotNum.

My code:
Private Sub cmbHouseType_BeforeUpdate(Cancel As Integer)
Forms![frmHouse]![qryHouse2]![PlotNum].SetFocus
If Forms![frmHouse]![qryHouse2]![PlotNum].Text = "" Then
Cancel = True
Me.Undo
MsgBox "Please enter the Plot Number first, then enter the House Type"
End If
End Sub

Any help will be very much appreciated
B

View 4 Replies View Related

Move Data From One Column To Another

Feb 13, 2006

OK, I have a truck mileage database with a columns for monthly "StartingMiles" and "EndingMiles" - At the beginning of each month I want to automatically move the entire content of the "EndingMiles" column to the "StartingMiles" so I can start a new reporting month. I'm assuming I can use an Update Query to do this - correct? How do I setup the Update query to perform this?
Or is there a better way?

View 1 Replies View Related

Move Form To Top Window

May 25, 2005

I have a pop up form that appears (with a beep) when a condition occurs. I would like that form to appear on top of all other window applications.

Access is an active application but the pop up form is hidden if other applications are in use.

Is there a way to have the pop up window appear on top?

Any help would be appreciated.

View 6 Replies View Related

ON Mouse Move Event

Feb 27, 2006

I have a switchboard using 4 different label that open a specific form when clicked. I have been trying to add a very simple code on the "on mouse move" event of each label that change the state of the 4 labels I am using:

Private Sub Form_Current()
Me.Option1.FontBold = True
Me.Option2.FontBold = False
Me.Option3.FontBold = False
Me.Option4.FontBold = False
Me.Arrow1.Visible = True
Me.Arrow2.Visible = False
Me.Arrow3.Visible = False
Me.Arrow4.Visible = False
End Sub

The code is working fine but all the label keeps flashing when I move the mouse over the labels which is a bit annoying. I don't see How I could get the "flashing" to stop. Would it be possible to cancel the "on move mouse event" once the code has been run once?

View 3 Replies View Related

Move A Selected Listbox Row Down 1 Row

Mar 24, 2006

hi
i apologize if this question has been answered before. i have looked at numerous others in the 'listbox' search box, but not had any success in adapting the answers to what i need.

i have a form A with a listbox of 1,400 rows

i then select maybe the 10th row down on the listbox, and

a new form B opens with information pertaining to the listbox row selected
form A changes its visible value from true to false

i do my editing on form B

now what i would like to do is, on form B click a next button and for

form B to close
form A to be visible again, and the next row (11th) on the list box be highlighted
form B to open again but with pertaining to the next listbox row (11th) selected
form A to not be visible

any help would be very much appreciated

View 1 Replies View Related

Move Records On ListBox

Mar 29, 2006

Here's a tough one that has been driving me crazy! (Probably easy, but I don't want to admit it!)

I have a form with a listbox called "lst_exclist". The recordsource for this listbox is the following query:

SELECT tbl_collexcludereasons.priority, tbl_collexcludereasons.excname, IIf(tbl_collexcludereasons.enabled=-1,'Enabled','Disabled') AS enabled, tbl_collexcludereasons.priority FROM tbl_collexcludereasons ORDER BY IIf(tbl_collexcludereasons.enabled=-1,'Enabled','Disabled') DESC , tbl_collexcludereasons.priority;

Which basically gives me this with dummy data:
2 PIPELINE ENABLED
3 HELLO ENABLED
5 GOODBYE ENABLED
1 BAD DISABLED
4 GOOD DISABLED
6 LAST DISABLED

I had two command buttons, one up arrow and one down arrow. The up arrow is supposed to move the selected record on the listbox up by exchanging the next lesser priority number with itself. The down arrow does the same. The DISABLED records are supposed to be ignored on the move up and move down procedures, meaning only ENABLED records are allowed to exchange priority numbers, and thus move up or down on the list. I tried the following code:

Me!lst_exclisthidden = Me!lst_exclist

DoCmd.SetWarnings False

Dim startingnumber As Integer
Dim endingnumber As Integer
Dim nametochange As String
Dim getchangerst As DAO.Recordset

If IsNull(Me!lst_exclist.Column(0)) = True Then
MsgBox "Please choose an entry on the above list to move.", vbCritical, "Error"
Exit Sub
Else
End If

If Me!lst_exclist.Column(2) = "Disabled" Then
MsgBox "There is no need to move a disabled selection, please enable the selection to change it's priority.", vbCritical, "Error"
Exit Sub
Else
End If

startingnumber = Me!lst_exclist.Column(0)
nametochange = Me!lst_exclist.Column(1)

endingnumber = startingnumber + 1

If Me!lst_exclisthidden = acLast Then
MsgBox "You cannot move the bottom selection on the list down, please choose another one.", vbCritical, "Error"
Exit Sub
Else
End If

While DCount("*", "tbl_collexcludereasons", "Priority = " & endingnumber & " and Enabled = -1") = 0
endingnumber = endingnumber + 1
Wend

DoCmd.RunSQL "Update tbl_collexcludereasons set tbl_collexcludereasons.priority = tbl_collexcludereasons.priority - 1 " & _
"Where tbl_collexcludereasons.priority <= " & endingnumber & " and tbl_collexcludereasons.priority > " & startingnumber

DoCmd.RunSQL "Update tbl_collexcludereasons set tbl_collexcludereasons.priority = " & endingnumber & " " & _
"Where tbl_collexcludereasons.excname = '" & nametochange & "'"

Me.Refresh

Me!lst_exclist = endingnumber

Me!lst_exclisthidden = Null

DoCmd.SetWarnings True

But it seems to loop when it gets the the area it is checking for numbers because the highest records is disabled, so it's ignored. How can I make this work? Please help!

Thanks

Vassago

View 1 Replies View Related

Prioritise And Move Values

Aug 16, 2006

I have a form which has a checkbox which allows a case to be marked for review. What I want is that if the case is marked for review, I want to be able to able to view these calls and change a priority and order of these cases. I will always have 10 priority spaces and I want to be able to move them up and down priority accordingly. I should be able to report on this.

Thanks

View 2 Replies View Related

Recall - Not Move To Next Control When Rtn

Nov 20, 2004

I do not want the cursor to move to the next control on a form when the user presses the enter key. It is a memo field and I want the cursor to move to the next line as it would in a word document.

Any ideas,
Recall

View 1 Replies View Related

Move Data From One Listbox To Another

Nov 27, 2013

I have two particlular listboxes in an Access Form the first is named listEmp and the second is listAllocated

The source of the first is a query which is based on previous combo boxes.

How can I move selected or all items from one box to another and back if needed.

I need the items moved to be removed from the original box so the data is only in one or the other box.

Please include any VBA that may be needed.

View 14 Replies View Related







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