Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / October 2007

Tip: Looking for answers? Try searching our database.

Dlookup and Dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SHIPP - 05 Oct 2007 17:59 GMT
I have the following field in a query.

DLookUp("gl_perod_id","ingres_gl_perod_tbl","[gl_perod_stdt]<=" &
Format([BegDate],"\#mm\/dd\/yyyy\#") & " and [gl_perod_enddt]>=" &
Format([BegDate],"\#mm\/dd\/yyyy\#"))

It keeps on giving me #Error. Any ideas or suggestions? I am using Access
2003.
Signature

M. Shipp

SHIPP - 05 Oct 2007 18:31 GMT
I solved the problem.

The function should be....

DLookUp("gl_perod_id","ingres_gl_perod_tbl","cdate([gl_perod_stdt])<= " &
Format([BegDate],"\#mm\/dd\/yyyy\#") & " and cdate([gl_perod_enddt])>= " &
Format([BegDate],"\#mm\/dd\/yyyy\#"))
Signature

M. Shipp

> I have the following field in a query.
>
[quoted text clipped - 4 lines]
> It keeps on giving me #Error. Any ideas or suggestions? I am using Access
> 2003.
Pieter Wijnen - 05 Oct 2007 18:44 GMT
Even better (more portable) is using military Format
ie
yyyy-mm-dd

HtH

Pieter

>I solved the problem.
>
[quoted text clipped - 12 lines]
>> It keeps on giving me #Error. Any ideas or suggestions? I am using Access
>> 2003.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.