Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Forms Coding > Re: Filling tex...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 41556 of 43413
Post > Topic >>

Re: Filling textboxes in form

by "Pete D." <pduffy211AT@[EMAIL PROTECTED] > Aug 7, 2008 at 06:40 PM

Bad form to include attachments in a newgroup forum.  If someone needs them

they will ask you to send them to a private location/email.
You may be ignored due to the attachments.  Just letting you know, I don't

think I'm well enough qualified to give you a good answer to this
question, 
I'm sure there is an easier way.  Pete
"Paul" <muelpaul@[EMAIL PROTECTED]
> wrote in message 
news:2C32F6E9-AC38-47DD-A408-AE06459FF0EA@[EMAIL PROTECTED]
> Hello there, I am trying to fill text boxes (see attached files) with 
> totals
> and averages and would like to use SQL code within the form.
>
> My current method would be to use individual queries with for each day
> (M,T,W,TH,F), month and year but would need so many queries.
> This is what I have so far...I tried pasting these into a sub but had
> multiple errors.
>
> Office 2003 is the version.
>
> Query for total quantity per year
> SELECT DatePart("yyyy",[RecyHistory].[DateRec]) AS DateRec,
> Sum(RecyHistory.PalletCount) AS SumOfPalletCount
> FROM RecyHistory
> GROUP BY DatePart("yyyy",[RecyHistory].[DateRec])
> ORDER BY DatePart("yyyy",[RecyHistory].[DateRec]);
>
> Query for monthly totals
> SELECT Sum(RecyHistory.PalletCount) AS SumOfPalletCount,
> RecyHistory.[Plastic-Metal-Moldwood], 
> Format([RecyHistory].[DateRec],"mmm")
> AS DateRec
> FROM RecyHistory
> GROUP BY RecyHistory.[Plastic-Metal-Moldwood],
> Format([RecyHistory].[DateRec],"mmm")
> ORDER BY Format([RecyHistory].[DateRec],"mmm");
>
> Query for Month Avg
> SELECT DISTINCTROW Avg([month total].SumOfPalletCount) AS [Avg Of
> SumOfPalletCount], Count(*) AS [Count Of month total]
> FROM [month total];
>
> Query for weekly totals
> SELECT Sum(RecyHistory.PalletCount) AS SumOfPalletCount,
> RecyHistory.[Plastic-Metal-Moldwood],
Format([RecyHistory].[DateRec],"ww")
> AS DateRec
> FROM RecyHistory
> GROUP BY RecyHistory.[Plastic-Metal-Moldwood],
> Format([RecyHistory].[DateRec],"ww")
> ORDER BY RecyHistory.[Plastic-Metal-Moldwood],
> Format([RecyHistory].[DateRec],"ww");
>
> Query for Week AVG
> SELECT DISTINCTROW Avg([Week total].SumOfPalletCount) AS [Avg Of
> SumOfPalletCount], Count(*) AS [Count Of week total]
> FROM [week total];
>
> Query for Daily total
> SELECT Sum(RecyHistory.PalletCount) AS SumOfPalletCount,
> RecyHistory.[Plastic-Metal-Moldwood], Format(RecyHistory.DateRec,"w") AS
> DateRec
> FROM RecyHistory
> GROUP BY RecyHistory.[Plastic-Metal-Moldwood],
> Format(RecyHistory.DateRec,"w");
>
> Query for daily AVG
> SELECT DISTINCTROW Avg([Day total].SumOfPalletCount) AS [Avg Of
> SumOfPalletCount], Count(*) AS [Count Of Day total]
> FROM [Day total];
>
> Can this be coded within the form?
>
> Thanks,
> Paul
>
>
>
>
>
>
>
 




 3 Posts in Topic:
Re: Filling textboxes in form
"Pete D." <p  2008-08-07 18:40:35 
Re: Filling textboxes in form
"Paul" <muel  2008-08-07 18:20:10 
Re: Filling textboxes in form
"Pete D." <p  2008-08-07 19:37:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 20:44:32 CST 2008.