WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Date limited report

 
   Home -> Office other -> Reports RSS
Next:  Oracle Blob and access 2003  
Author Message
LaurieTuff via AccessMons

External


Since: Nov 03, 2009
Posts: 2



(Msg. 1) Posted: Tue Nov 03, 2009 6:05 pm
Post subject: Date limited report
Archived from groups: microsoft>public>access>reports (more info?)

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
Back to top
Login to vote
Jeff Boyce

External


Since: Nov 04, 2004
Posts: 2279



(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
>
Back to top
Login to vote
John Spencer

External


Since: Apr 09, 2008
Posts: 737



(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?)

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

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??
>
Back to top
Login to vote
LaurieTuff via AccessMons

External


Since: Nov 03, 2009
Posts: 2



(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??

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200911/1
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Reports 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
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support