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 June 7th, 2005, 04:41 PM
aimeec aimeec is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 2 aimeec User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 30 sec
Reputation Power: 0
Date issues

I have created a database to track employee vacation. the table I have setup has the transaction id, employee id, start date, end date and type of vacation. I need to be able to report on individual days - how may staff are on vacation but because my table is set up "start date" to "end date", I can't query on the in between days. Is there any way to break out the date ranges in order to be able to query individual days?

Reply With Quote
  #2  
Old June 9th, 2005, 06:30 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
The easiest method would be to open your query in design view. In a blank column copy and paste this into the top row (Field)

IIf([Enter Date]>=[Start Date] And [Enter Date]<=[End Date],"True","False")

For the criteria directly below type in "True" and uncheck the Show check box to hide this field from your query. Save and close the query.

Now when you run the query, the parameter box will open to type in the date that you want to query on. Use the same format as your start and end date. The query will run and only show records that match the date you typed in.

lwells

Reply With Quote
  #3  
Old June 10th, 2005, 10:44 AM
aimeec aimeec is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 2 aimeec User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 30 sec
Reputation Power: 0
Thanks so much...I knew there must be a way to do it, but could not for the life me figure it out!

Quote:
Originally Posted by lwells
The easiest method would be to open your query in design view. In a blank column copy and paste this into the top row (Field)

IIf([Enter Date]>=[Start Date] And [Enter Date]<=[End Date],"True","False")

For the criteria directly below type in "True" and uncheck the Show check box to hide this field from your query. Save and close the query.

Now when you run the query, the parameter box will open to type in the date that you want to query on. Use the same format as your start and end date. The query will run and only show records that match the date you typed in.

lwells

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Date issues


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 6 hosted by Hostway
Stay green...Green IT