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 February 17th, 2013, 12:48 AM
abcman abcman is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 abcman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 26 sec
Reputation Power: 0
Access Query Dates between two fields.

Hi All and thanks in advance for the help.

I created a database with the following fields :
PatientName which is a text
DateIn which is a date
DateOut which is also a date

If the patient was in on 01/01/2012 and he was out on 10/01/2012 In the format (DD/MM/YYYY) it is so easy to get the names of people between the exact such dates.

How can I get this list of names for patients between 03/01/2012 and 08/01/2012 As you can see that the patient(s) is still in within this period but the database does not show him because I have to provide the exact date. Can you please please help me on this. Thanks.

Reply With Quote
  #2  
Old February 24th, 2013, 01:54 AM
abcman abcman is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 abcman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 26 sec
Reputation Power: 0
Help - Query Problem

Everybody. Please help. No expert to solve this small matter ?. Thanks.

Reply With Quote
  #3  
Old February 24th, 2013, 02:26 PM
June7's Avatar
June7 June7 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2010
Location: The Great Land
Posts: 256 June7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 9 h 29 m 29 sec
Reputation Power: 5
Do you want every patient that had any time within the criteria range even if their start or end date is outside the range? Try:

SELECT * FROM tablename WHERE
[Enter start date] BETWEEN [StartDate] AND [EndDate] OR [Enter end date] BETWEEN [StartDate] AND [EndDate];
__________________
I like to know if my suggestion helped you. One way to let me know is by clicking scales at top right corner of post.
Debug!Debug!Debug!http://www.cpearson.com/excel/debug.htm

Reply With Quote
  #4  
Old February 25th, 2013, 12:13 AM
abcman abcman is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 abcman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 26 sec
Reputation Power: 0
Excellent and thanks. Well I am not an expert in programming but where should I put these two sentenses you have written. Thanks ????

Reply With Quote
  #5  
Old February 28th, 2013, 06:14 AM
abcman abcman is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 abcman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 26 sec
Reputation Power: 0
I am really lost really what do you mean ?.

Thanks.

Reply With Quote
  #6  
Old February 28th, 2013, 11:40 PM
June7's Avatar
June7 June7 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2010
Location: The Great Land
Posts: 256 June7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 9 h 29 m 29 sec
Reputation Power: 5
The example I posted is a query. Use Access query designer to help you build query objects. This is basic Access functionality. Access Help has guidelines.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Access Query Dates between two fields.


Developer Shed Advertisers and Affiliates


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap