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 / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Date help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
EMILYTAN - 16 May 2007 03:30 GMT
Can anyone please help me to check the code below?
I execute in VBA and a error message display object required...

Dim SecondDate As Date

SecondDate = CDate(Me.cboDateExpired)
Me.DaysExpired = DateDiff(DateInterval.Day, Now, SecondDate)
Rob Parker - 16 May 2007 03:43 GMT
Try:
   Me.DaysExpired = DateDiff("d", Now, SecondDate)

HTH,

Rob

> Can anyone please help me to check the code below?
> I execute in VBA and a error message display object required...
[quoted text clipped - 3 lines]
> SecondDate = CDate(Me.cboDateExpired)
> Me.DaysExpired = DateDiff(DateInterval.Day, Now, SecondDate)
EMILYTAN - 16 May 2007 03:54 GMT
I can get the result already..
Can I ask how to change the text box to red color if my days expired is
positive ?
Dim SecondDate As Date

SecondDate = CDate(Me!cboDateExpired)
Me!DaysExpired = DateDiff("d", SecondDate, Now)

>Can anyone please help me to check the code below?
>I execute in VBA and a error message display object required...
[quoted text clipped - 3 lines]
>SecondDate = CDate(Me.cboDateExpired)
>Me.DaysExpired = DateDiff(DateInterval.Day, Now, SecondDate)
Rob Parker - 16 May 2007 04:10 GMT
Use conditional formatting; you'll find it on the Format menu.  Just fill in
the appropriate entries in the dialog box, and chose the text colour you
want.

HTH,

Rob

>I can get the result already..
> Can I ask how to change the text box to red color if my days expired is
[quoted text clipped - 11 lines]
>>SecondDate = CDate(Me.cboDateExpired)
>>Me.DaysExpired = DateDiff(DateInterval.Day, Now, SecondDate)
 
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.