If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
date compare not working
If DateDiff("d", Date - 1, Me![LaborDate]) = 0 Then
Me![Command1].Enabled = False Me![Command1].Visible = False Else Me![Command1].Enabled = True Me![Command1].Visible = True End If Date - 1 = yesterday, labordate=yesterday But, the command button reamins visible and enabled. What is the matter. Very Very frustrated!!! Thanks |
#2
|
|||
|
|||
as in other post, try date()-1 rather than date-1
-----Original Message----- If DateDiff("d", Date - 1, Me![LaborDate]) = 0 Then Me![Command1].Enabled = False Me![Command1].Visible = False Else Me![Command1].Enabled = True Me![Command1].Visible = True End If Date - 1 = yesterday, labordate=yesterday But, the command button reamins visible and enabled. What is the matter. Very Very frustrated!!! Thanks . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calendar Object | Steve | Setting Up & Running Reports | 1 | May 18th, 2004 04:44 PM |
Does date fall between two ranges? | MR | Worksheet Functions | 4 | January 14th, 2004 04:08 PM |