i suspect that dates are expected to be mm/dd/yy sequence in many functions
and SQL code . . so try that and ignore your regional settings
frowning here on this one
cheers paul g
"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
news:3fecea0e$0$1742$5a62ac22@freenews.iinet.net.a u...[color=blue]
> Stewart, that is reall strange behaviour. What version of Access? And what
> service pack (Help | About should tell)? Is this the latest Office service
> pack for your version of Office? And also of JET? The service pack info is
> at support.microsoft.com
>
> Haven't seen anything like that since the y2k issues that Access 2 had.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users -
http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Stewart Allen" <sagasu@ThisPartNotVailid.wave.co.nz> wrote in message
> news:bsi1bg$rbh$1@news.wave.co.nz...[color=green]
> > Yes the DateEnd field is Date/Time and my Regional Setting show a 4[/color][/color]
digit[color=blue][color=green]
> > year in NZ format. The results in the immediate pane do display as
> > dd/mm/yyyy but I just wrote the dates in my question as mm/dd/yy.
> >
> > The only time it pulls the correct date is when the month is the same as[/color]
> the[color=green]
> > month in the table i.e.
> > ? DMin("DateEnd", "tblPeriods", "DateEnd >= #12/08/2002#")
> > will pull the 15 Dec 2002 record but
> > ? DMin("DateEnd", "tblPeriods", "DateEnd >= #11/20/2002#")
> > will display 30 Nov 2002 and that record doesn't exist.
> >
> > Any other ideas?
> > Stewart
> >
> >
> > "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
> > news:3fec4ed4$0$1730$5a62ac22@freenews.iinet.net.a u...[color=darkred]
> > > If you open the table in design view, what type of field is DateEnd?[/color][/color][/color]
Is[color=blue]
> it[color=green][color=darkred]
> > > Date/Time?
> > >
> > > Go to the Windows Control Panel | Regional Settings, and change Short[/color][/color]
> Date[color=green][color=darkred]
> > > so that it uses a 4-digit year (i.e. include the letter y 4 times).[/color][/color][/color]
This[color=blue][color=green]
> > may[color=darkred]
> > > help clarify what the dates actually are.
> > >
> > > There is an extra quote mark in your 3rd argument. In the Immediate[/color]
> > Window,[color=darkred]
> > > paste this:
> > > ? DMin("DateEnd", "tblPeriods", "DateEnd >= #10/20/2002#")
> > >
> > > The fact that Access is returning the last day of the month is a hint[/color][/color]
> that[color=green][color=darkred]
> > > something is wrong. If you are in New Zealand, I would expect your[/color][/color][/color]
date[color=blue][color=green][color=darkred]
> > > format for your interface to be dd/mm/yyyy. You are correctly[/color][/color][/color]
supplying[color=blue][color=green]
> > the[color=darkred]
> > > argument as mm/dd/yyyy, but there may be something screwy with how the[/color]
> > dates[color=darkred]
> > > are appearing in your table.
> > >
> > > --
> > > Allen Browne - Microsoft MVP. Perth, Western Australia.
> > > Tips for Access users -
http://allenbrowne.com/tips.html
> > > Reply to group, rather than allenbrowne at mvps dot org.
> > >
> > > "Stewart Allen" <sagasu@ThisPartNotVailid.wave.co.nz> wrote in message
> > > news:bsh349$jiu$1@news.wave.co.nz...
> > > >
> > > > I'm having trouble with the DMin function in finding the next date[/color][/color][/color]
in[color=blue][color=green]
> > the[color=darkred]
> > > > table that is greater than or is the same the date entered;
> > > >
> > > > The dates in the table's field are
> > > > 04/18/02
> > > > 06/16/02
> > > > 09/10/02
> > > > 12/15/02
> > > > 04/18/03
> > > > 06/14/03
> > > > 09/08/03
> > > > 12/13/03
> > > >
> > > > In the immediate pane I've typed
> > > > DMin("[DateEnd]", "tblPeriods", "[DateEnd]>=#"10/20/02#")
> > > > this returns 10/31/02 and this date doesn't exist in my table. I[/color][/color][/color]
want[color=blue]
> it[color=green][color=darkred]
> > > to
> > > > return 12/15/02 because this is the next date stored. When I change[/color][/color]
> the[color=green][color=darkred]
> > > date
> > > > to #11/20/02# it returns 11/30/02. How can I find the next date[/color][/color][/color]
stored[color=blue][color=green]
> > in[color=darkred]
> > > > the table? I've tried the FindFirst method and it returns the same.
> > > >
> > > > Stewart[/color][/color]
>
>[/color]