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 / Database Design / January 2008

Tip: Looking for answers? Try searching our database.

Dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lambi000 - 29 Jan 2008 18:06 GMT
I'm using a form for a from/to date for users.  I was using the calendar
control but I ended up with some bizarre "froms" and "tos".  I set the "from"
to 1/20/2008 and got all the records from that date from 7:52 AM on....but I
was missing seven records from 12:27 AM to the aforementioned date.  The "to"
gave me half the records for the date 01//26/2008 but didn't give me any
records past 3:29 PM.  

I switched from the calender tool and put in a text box and now the user
types in the date, but in order for me to get 0/26/2008 records, I have to
input 01/27/2008.  That gives me all of 1/26 records and none of 1/27.  

BTW, I'm using the short date format.

Thanx!

I think I had this problem before but something is getting real weird here.  
Any clues as to what's happening?
Jeff Boyce - 29 Jan 2008 18:44 GMT
I believe the "short date form" applies to the value displayed, not the
value stored.

Are you storing the Date-only value (using something like the Date()
function), or a Date/Time value (using something like the Now() function)?

When you say "get", how are you getting?  Are you using a query?  If so,
please post the SQL statement.

We aren't there, we can't see how you are inputting "01/27/2008", nor where.

More info, please!

Regards

Jeff Boyce
Microsoft Office/Access MVP

> I'm using a form for a from/to date for users.  I was using the calendar
> control but I ended up with some bizarre "froms" and "tos".  I set the
[quoted text clipped - 17 lines]
> here.
> Any clues as to what's happening?
Lambi000 - 30 Jan 2008 11:56 GMT
Sorry, here's the SQL.  I'm using "Between" Text Boxes that the user inputs.  

SELECT dbo_fShopActivity.ActualFinishTime, dbo_fShopActivity.TransactionNum,
dbo_fShopActivity.Employee_CrewID, dbo_fShopActivity.ShiftSetAssigned,
dbo_fShopActivity.ShiftAssigned, dbo_fShopActivity.DepartmentNum,
dbo_fShopActivity.WorkCenterNum, dbo_fShopActivity.rWindow_I_C_S,
dbo_fShopActivity.TransactionName, dbo_fShopActivity.RecordStatus,
dbo_fShopActivity.ActualStartTime, dbo_fShopActivity.AdjustedStartTime,
dbo_fShopActivity.ActualFinishTime, dbo_fShopActivity.AdjustedFinishTime,

Etc. etc. a whole bunch of other fields

dbo_fShopActivity.SerialNum, dbo_fShopActivity.LotNum,
MIRR_SFBP602UF_IIMEXT.INNLBS, MIRR_SFBP602UF_IIMEXT.UNQTY
FROM dbo_fShopActivity LEFT JOIN MIRR_SFBP602UF_IIMEXT ON
dbo_fShopActivity.ItemNum = MIRR_SFBP602UF_IIMEXT.IPROD
WHERE (((dbo_fShopActivity.ActualFinishTime) Between ([Forms]![Report
Parameters]![Text67]) And ([Forms]![Report Parameters]![Text69])))
ORDER BY dbo_fShopActivity.ActualFinishTime;

> I believe the "short date form" applies to the value displayed, not the
> value stored.
[quoted text clipped - 35 lines]
> > here.
> > Any clues as to what's happening?
Jeff Boyce - 31 Jan 2008 01:27 GMT
Can you rewrite the query and use "hard-coded" date values and have it work
correctly?

Regards

Jeff Boyce
Microsoft Office/Access MVP

> Sorry, here's the SQL.  I'm using "Between" Text Boxes that the user
> inputs.
[quoted text clipped - 65 lines]
>> > here.
>> > Any clues as to what's happening?
Lambi000 - 31 Jan 2008 17:34 GMT
Jeff,

What do you mean by "hard-coded"?  

> Can you rewrite the query and use "hard-coded" date values and have it work
> correctly?
[quoted text clipped - 73 lines]
> >> > here.
> >> > Any clues as to what's happening?
Jeff Boyce - 31 Jan 2008 19:36 GMT
Instead of using a parameter for the user to input a date, use something
like #1/2/2003# (i.e., "hard-code" the dates ... put actual date values into
the query instead of using the parameters).

Regards

Jeff Boyce
Microsoft Office/Access MVP

> Jeff,
>
[quoted text clipped - 85 lines]
>> >> > here.
>> >> > Any clues as to what's happening?
 
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.