Re: VBA dating

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Andrej (andrej.gobec_at_volja.net)
Date: 02/05/04


Date: 5 Feb 2004 01:02:07 -0800

Much obliged, good sir!!

I would take you out for a beer, or whatever you prefer, if I could!!

You have really brightened up my day!! Your solution works perfectly! :D

Thanks a lot,
Andrej

--
"Van T. Dinh" <VanT.Dinh@discussions.microsoft.com> wrote in message news:<eJWSK6x6DHA.696@tk2msftngp13.phx.gbl>...
> The difference is that in the ApplyFilter statements, you used *literal*
> dates which must be in the US format "mm/dd/yyyy" enclosed in hashes.  My
> guess is that you Regional Settings use a different "Short Date" format from
> above and therefore Access doesn't filter correctly.
> 
> Try:
> 
> DoCmd.ApplyFilter , "[date_of_production] = #" & _
>     Format(Me.cbo_date.Value, "mm/dd/yyyy") & "#"
> 
> or simpler, try:
> 
> DoCmd.ApplyFilter , "[date_of_production] = [cbo_date]"
> 
> or
> 
> DoCmd.ApplyFilter , "[date_of_production] = Form![cbo_date]"
> 
> and Access should interpret your filter correctly.
> 
> -- 
> HTH
> Van T. Dinh
> MVP (Access)


Relevant Pages

  • Re: taking picture of desktop
    ... at the highest quality, the loss is minimal. ... particular picture at a particular time and the character of the format ... A full glass of beer has lost no beer. ...
    (comp.sys.mac.apps)
  • Re: Ruby beginner Problem
    ... Thanks Lasitha that worked perfect. ... beer on the wall" ... hitting == will format the current line. ...
    (comp.lang.ruby)
  • RE: crosstab query failed emergency help
    ... yes sir i know that functions to get monthnameand date. ... the query property as mm/yy and dd it is simply giving me in the required ... fields as month/year, date, attendence. ... in the format dd/mm/yy and innerjoin with above table ...
    (microsoft.public.access.queries)
  • Re: How long before FIREPOWERs ???
    ... (Insert Beer back into my nose now!) ... Yes sir it was a veritible deluge of plastic, ...
    (rec.games.pinball)
  • Re: What long time band to you have the most respect for?
    ... Tattoo Vampire wrote: ... > The Space Boss hitched up their overalls, ... > shotgunned a beer and wrote: ... >> YOU DON'T MEAN, SIR, THAT YOU LIKE THE NEW ALBUMS BETTER THAN THE ...
    (rec.music.artists.kiss)