|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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! |
|
#2
|
||||
|
||||
|
Have you tried using DateAdd? The -61 is meaningless for dates.
Try: Between ([Forms]![frmMaryLtrReview]![txtSentDate]) And DateAdd("d",-61,[Forms]![frmMaryLtrReview]![txtSentDate]) |
|
#3
|
|||
|
|||
|
Thanks Dykebert, that was it!
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Problem with query date range using control |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|