G
Guest
I have three pairs of command buttons whose enabled properties are set to
disabled. I want each of then to become enabled on form load on three
separate dates. The code that I have written for this to happen is mentioned
below:
If Date >= #7/1/2005# Then
cmdAllot6.Enabled = True
cmdReq6.Enabled = True
ElseIf Date >= #7/1/2006# Then
cmdAllot7.Enabled = True
cmdReq7.Enabled = True
ElseIf Date >= #7/1/2007# Then
cmdAllot8.Enabled = True
cmdReq8.Enabled = True
End If
If I change the date on my computer to say 23-Mar-2006, cmdAllot6 and
cmdReq6 become enabled on form load. However, if the date is changed to
23-Mar-2010, the other two pairs of command buttons do not become enabled.
There seems to be something wrong with the code.
I would appreciate if someone can rescue me urgently.
disabled. I want each of then to become enabled on form load on three
separate dates. The code that I have written for this to happen is mentioned
below:
If Date >= #7/1/2005# Then
cmdAllot6.Enabled = True
cmdReq6.Enabled = True
ElseIf Date >= #7/1/2006# Then
cmdAllot7.Enabled = True
cmdReq7.Enabled = True
ElseIf Date >= #7/1/2007# Then
cmdAllot8.Enabled = True
cmdReq8.Enabled = True
End If
If I change the date on my computer to say 23-Mar-2006, cmdAllot6 and
cmdReq6 become enabled on form load. However, if the date is changed to
23-Mar-2010, the other two pairs of command buttons do not become enabled.
There seems to be something wrong with the code.
I would appreciate if someone can rescue me urgently.