(Msg. 2) Posted: Tue Nov 03, 2009 6:05 pm
Post subject: Re: Date limited report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
"the report fails" is not very informative...
Does your PC melt down? Does it lock up? ... or does it present an error
message? If so, it might help us diagnose if we knew what that message
is...
Regards
Jeff Boyce
Microsoft Access MVP
--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.
Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.
You can thank the FTC of the USA for making this disclaimer
possible/necessary.
"LaurieTuff via AccessMonster.com" <u37763@uwe> wrote in message
news:9e94ee8f67e01@uwe...
> XP and Access 2002
>
> Public SelectDate as Date
>
> If SelectDate is 14/10/2009 the following works but if SelectDate is
> 4/10/2009 (any single digit day of month) the report fails
>
> Me.Filter = "[ResActivity Query].[ResidentID] = " & SelectRecord
>
> Me.Filter = "((" & Me.Filter & ") and ([ResActivity Query].Date = #" &
> SelectDate & "#))"
>
> What am I doing wrong??
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200911/1 >
(Msg. 3) Posted: Tue Nov 03, 2009 7:07 pm
Post subject: Re: Date limited report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
The problem is probably that Access is returning the date April 10 2009 (US
format instead of October 4, 2009 as you expect.
With 14/10/2009 Access knows there is no 14th month, so it rearranges the
input to make 14 the day and 10 the month.
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
LaurieTuff via AccessMonster.com wrote:
> XP and Access 2002
>
> Public SelectDate as Date
>
> If SelectDate is 14/10/2009 the following works but if SelectDate is
> 4/10/2009 (any single digit day of month) the report fails
>
> Me.Filter = "[ResActivity Query].[ResidentID] = " & SelectRecord
>
> Me.Filter = "((" & Me.Filter & ") and ([ResActivity Query].Date = #" &
> SelectDate & "#))"
>
> What am I doing wrong??
>
(Msg. 4) Posted: Tue Nov 03, 2009 10:05 pm
Post subject: Re: Date limited report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Sorry - I was a little vague about the failure mode! However John, that was
the problem and it is now resolved. Thanks for your input.
Regards, Laurie
John Spencer wrote:
>Try an unambiguous date format yyyy-mm-dd
>
>Me.Filter = "((" & Me.Filter & ") and ([ResActivity Query].Date = #" &
>Format(SelectDate,"yyyy-mm-dd") & "#))"
>
>The problem is probably that Access is returning the date April 10 2009 (US
>format instead of October 4, 2009 as you expect.
>
>With 14/10/2009 Access knows there is no 14th month, so it rearranges the
>input to make 14 the day and 10 the month.
>
>John Spencer
>Access MVP 2002-2005, 2007-2009
>The Hilltop Institute
>University of Maryland Baltimore County
>
>> XP and Access 2002
>>
>[quoted text clipped - 9 lines]
>>
>> What am I doing wrong??
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum