I have 2 date fields on my form. One is named one and the other is named two
What is the proper syntax to check if the current date is between these 2 fields ?
I have 2 date fields on my form. One is named one and the other is named two
What is the proper syntax to check if the current date is between these 2 fields ?
In an unbound text box on a form: the control source would be
Set the Format property of the control box to "True/False"Code:=Date()>=[one] And Date()<=[Two]
Ok, I tried the code below but it does not work. Here is my complete code to check if the current Date is between the current weeks on call period. If so then the other weeks command buttons should be disabled with only the current weeks pay period being enabled. I get no errors, it just does not work. I tried simply FirstWeekThursday.Enabled = False and it works without the date.
If Date >= [three] And Date <= [four] Then ' Disables Date Buttons for First,Third and Final Week Command Buttons
FirstWeekThursday.Enabled = False 'code for this is named one
FirstWeekWednesday.Enabled = False 'code for this is named two
ThirdWeekThursday.Enabled = False 'code for this is named five
ThirdWeekWednesday.Enabled = False 'code for this is named six
FinalWeekThursday.Enabled = False 'code for this is named seven
FinalWeekWednesday.Enabled = False 'code for this is named eight
End If
Duplicate thread https://www.accessforums.net/access/...not-29326.html
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.