Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 6th, 2005, 11:52 AM
Breed372 Breed372 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 7 Breed372 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 58 sec
Reputation Power: 0
Thumbs down How do I avoid Parameters?

I am turning one Date Column into two columns containing the min and max date values for a set of records. From these columns i am trying to derive the duration in days between two instances. I am getting the correct results but the query prompts me for the Min and Max date because the formula contains the field names in brackets Days Wkd:

DateDiff("d",[MinOfCREA DATE],[MaxOfCREA DATE])

Can i avoid getting this prompt or calculate the difference between these dates without creating the Min and Max column?

The way it is currently set up i can't pull the duration column i am creating into another query because the second query doesn't see the Min and Max Value.

Reply With Quote
  #2  
Old July 6th, 2005, 02:33 PM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
Query SQL:

SELECT Min([CREA DATE]) AS Minimum, Max([CREA DATE]) AS Maximum, DateDiff("d",[Minimum],[Maximum]) AS Difference
FROM TableName;

Above assumes that the [CREA DATE] with a space in the middle was the name of your date field.

lwells

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > How do I avoid Parameters?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT