A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculating in Queries



 
 
Thread Tools Display Modes
  #1  
Old July 21st, 2008, 03:50 PM posted to microsoft.public.access.queries
Fendi Girl
external usenet poster
 
Posts: 3
Default Calculating in Queries

Hi

How can I design a query that calculates hours for each project worked
trough the week (time sheets, like job no. 205 Mon 2hrs + Tue 7.5 hrs Wed 0+
Thu 0+ Fri 6hrs = Total15.5 hrs) and at the same time allows me inputing new
records.
--
Fendi Girl
  #2  
Old July 21st, 2008, 04:08 PM posted to microsoft.public.access.queries
Stefan Hoffmann
external usenet poster
 
Posts: 709
Default Calculating in Queries

hi Fendi,

Fendi Girl wrote:
How can I design a query that calculates hours for each project worked
trough the week (time sheets, like job no. 205 Mon 2hrs + Tue 7.5 hrs Wed 0+
Thu 0+ Fri 6hrs = Total15.5 hrs) and at the same time allows me inputing new
records.

How to you store the data?

E.g.:

SELECT [job no.], Sum([TimeSpent]) AS ProjectTimeSpent
FROM [yourTable]
GROUP BY [job no.]



mfG
-- stefan --
  #3  
Old July 21st, 2008, 04:34 PM posted to microsoft.public.access.queries
Klatuu
external usenet poster
 
Posts: 7,074
Default Calculating in Queries

If you have a table that has a field for each day of the week, you are
already going in the wrong direction. Rather than one record with a field
for each day of the week, each day should be in a separate record with the
date and the value you need to capture.

Also, users should not be entering data directly in a table or a query, they
should be entering and view data in forms.
--
Dave Hargis, Microsoft Access MVP


"Fendi Girl" wrote:

Hi

How can I design a query that calculates hours for each project worked
trough the week (time sheets, like job no. 205 Mon 2hrs + Tue 7.5 hrs Wed 0+
Thu 0+ Fri 6hrs = Total15.5 hrs) and at the same time allows me inputing new
records.
--
Fendi Girl

  #4  
Old July 21st, 2008, 05:08 PM posted to microsoft.public.access.queries
Fendi Girl
external usenet poster
 
Posts: 3
Default Calculating in Queries

GROUP BY clause does not allow new record input
--
Fendi Girl


"Stefan Hoffmann" wrote:

hi Fendi,

Fendi Girl wrote:
How can I design a query that calculates hours for each project worked
trough the week (time sheets, like job no. 205 Mon 2hrs + Tue 7.5 hrs Wed 0+
Thu 0+ Fri 6hrs = Total15.5 hrs) and at the same time allows me inputing new
records.

How to you store the data?

E.g.:

SELECT [job no.], Sum([TimeSpent]) AS ProjectTimeSpent
FROM [yourTable]
GROUP BY [job no.]



mfG
-- stefan --

  #5  
Old July 21st, 2008, 05:15 PM posted to microsoft.public.access.queries
Fendi Girl
external usenet poster
 
Posts: 3
Default Calculating in Queries

The purpose of the time sheet is to allow each employee to login and enter
they time sheet each week. They would be doing this in forms. Previous
developer created the time sheet so that they had a field for each day of the
week giving a total hours for each project and this is what they want to have
with the new databese.
--
Fendi Girl


"Klatuu" wrote:

If you have a table that has a field for each day of the week, you are
already going in the wrong direction. Rather than one record with a field
for each day of the week, each day should be in a separate record with the
date and the value you need to capture.

Also, users should not be entering data directly in a table or a query, they
should be entering and view data in forms.
--
Dave Hargis, Microsoft Access MVP


"Fendi Girl" wrote:

Hi

How can I design a query that calculates hours for each project worked
trough the week (time sheets, like job no. 205 Mon 2hrs + Tue 7.5 hrs Wed 0+
Thu 0+ Fri 6hrs = Total15.5 hrs) and at the same time allows me inputing new
records.
--
Fendi Girl

  #6  
Old July 21st, 2008, 05:40 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Calculating in Queries

Dave is pointing out that how the data is stored (in tables) and how it is
presented to the users (in forms) does not have to match.

If your data isn't stored (in tables) in a structure Access understands
(i.e., relational, well-normalized), then both you and Access will have to
work much harder to do "simple" things.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Fendi Girl" wrote in message
...
The purpose of the time sheet is to allow each employee to login and enter
they time sheet each week. They would be doing this in forms. Previous
developer created the time sheet so that they had a field for each day of
the
week giving a total hours for each project and this is what they want to
have
with the new databese.
--
Fendi Girl


"Klatuu" wrote:

If you have a table that has a field for each day of the week, you are
already going in the wrong direction. Rather than one record with a
field
for each day of the week, each day should be in a separate record with
the
date and the value you need to capture.

Also, users should not be entering data directly in a table or a query,
they
should be entering and view data in forms.
--
Dave Hargis, Microsoft Access MVP


"Fendi Girl" wrote:

Hi

How can I design a query that calculates hours for each project worked
trough the week (time sheets, like job no. 205 Mon 2hrs + Tue 7.5 hrs
Wed 0+
Thu 0+ Fri 6hrs = Total15.5 hrs) and at the same time allows me
inputing new
records.
--
Fendi Girl



  #7  
Old July 22nd, 2008, 12:16 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Calculating in Queries

You can have a control on the form that will show the total as a
calculation. IF you are showing one person at a time you can use a
continuous form with a control in the form's header or footer to show
the total.

Another option is to use a work table to import an individual's data
into a non-normalized structure, work with this copy of the data, and
then "copy" the non-normalized data back into your normalized data
structure.

This takes a little bit of VBA code to transfer the data back and forth,
but it is not very difficult.

'================================================= ===
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'================================================= ===


Jeff Boyce wrote:
Dave is pointing out that how the data is stored (in tables) and how it is
presented to the users (in forms) does not have to match.

If your data isn't stored (in tables) in a structure Access understands
(i.e., relational, well-normalized), then both you and Access will have to
work much harder to do "simple" things.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Fendi Girl" wrote in message
...
The purpose of the time sheet is to allow each employee to login and enter
they time sheet each week. They would be doing this in forms. Previous
developer created the time sheet so that they had a field for each day of
the
week giving a total hours for each project and this is what they want to
have
with the new databese.
--
Fendi Girl


"Klatuu" wrote:

If you have a table that has a field for each day of the week, you are
already going in the wrong direction. Rather than one record with a
field
for each day of the week, each day should be in a separate record with
the
date and the value you need to capture.

Also, users should not be entering data directly in a table or a query,
they
should be entering and view data in forms.
--
Dave Hargis, Microsoft Access MVP


"Fendi Girl" wrote:

Hi

How can I design a query that calculates hours for each project worked
trough the week (time sheets, like job no. 205 Mon 2hrs + Tue 7.5 hrs
Wed 0+
Thu 0+ Fri 6hrs = Total15.5 hrs) and at the same time allows me
inputing new
records.
--
Fendi Girl



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.