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 April 18th, 2008, 12:17 PM
frogmann frogmann is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 frogmann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 42 sec
Reputation Power: 0
Problem with query date range using control

Hello, I've been working on a query that references a control from a form. I know that I am using the correct reference: [Forms]![frmMaryLtrReview]![txtSentDate] as this works when I try a range: <[Forms]![frmMaryLtrReview]![txtSentDate].
However, I want to specify a range from the date in the control like: Between ([Forms]![frmMaryLtrReview]![txtSentDate]) And ([Forms]![frmMaryLtrReview]![txtSentDate]-61)
Nothing I try seems to work. I have tried:
Between #" & [Forms]![frmMaryLtrReview]![txtSentDate] & "# And #" & [Forms]![frmMaryLtrReview]![txtSentDate] & "#-61
etc.
Any ideas or suggestions would be very helpful. Thanks!

Reply With Quote
  #2  
Old April 18th, 2008, 01:09 PM
dykebert's Avatar
dykebert dykebert is offline
Contributing User
Click here for more information. Click here for more information
 
Join Date: Apr 2008
Posts: 266 dykebert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 18 h 23 m 7 sec
Reputation Power: 1
Have you tried using DateAdd? The -61 is meaningless for dates.

Try:
Between ([Forms]![frmMaryLtrReview]![txtSentDate]) And DateAdd("d",-61,[Forms]![frmMaryLtrReview]![txtSentDate])

Reply With Quote
  #3  
Old April 22nd, 2008, 12:56 PM
frogmann frogmann is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 frogmann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 42 sec
Reputation Power: 0
Thanks Dykebert, that was it!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Problem with query date range using control


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 1 hosted by Hostway