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  

Average time with a single entry



 
 
Thread Tools Display Modes
  #1  
Old June 1st, 2010, 10:49 PM posted to microsoft.public.access.queries
Alejandro
external usenet poster
 
Posts: 24
Default Average time with a single entry

Hello there,

i have a form with a query that calculates the average processing time for a
event and it works fine when there's been more than one entry. I understand
that the average of a single time doesn't make much sense, but the user sees
BLANK in that field when there's only been one time saved in the database. Is
there a way to show the average time if count2 and show the real time if
count=1?

Thanks!
  #2  
Old June 1st, 2010, 11:03 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Average time with a single entry

Post the SQL of your query.
--
Build a little, test a little.


"Alejandro" wrote:

Hello there,

i have a form with a query that calculates the average processing time for a
event and it works fine when there's been more than one entry. I understand
that the average of a single time doesn't make much sense, but the user sees
BLANK in that field when there's only been one time saved in the database. Is
there a way to show the average time if count2 and show the real time if
count=1?

Thanks!

  #3  
Old June 2nd, 2010, 01:38 AM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Average time with a single entry

Hard to say without seeing the query structure.

Are you getting the time from two different records? And if there is no
preceding record there is no time? Perhaps you can use the NZ function to
solve the problem by forcing zero when your calculation is showing blank.

Again, it is difficult to say without more information on the query. Can you
post the SQL statement of the query?

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

Alejandro wrote:
Hello there,

i have a form with a query that calculates the average processing time for a
event and it works fine when there's been more than one entry. I understand
that the average of a single time doesn't make much sense, but the user sees
BLANK in that field when there's only been one time saved in the database. Is
there a way to show the average time if count2 and show the real time if
count=1?

Thanks!

 




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 08:11 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.