A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

date compare not working



 
 
Thread Tools Display Modes
  #1  
Old September 23rd, 2004, 07:48 PM
external usenet poster
 
Posts: n/a
Default 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  
Old September 23rd, 2004, 08:09 PM
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.