Paul Cooke
Registered User.
- Local time
- Today, 13:24
- Joined
- Oct 12, 2001
- Messages
- 288
Hi Guys
I am getting confused trying to code a button after dates have been entered in two boxes - Start Date and End Date
On opening the form the cmd button (View Reports) is disabled. The user enters dates in the Start and End date boxes, once this is done the cmd button enables.
However if they decide to clear the dates (using another cmd button 'clear Dates') then I need the View Reports button to go back to being disabled.
I have tried the following on lost focus, on change ect but noting seems to work!
any advice greatfully recieved - many thanks
I am getting confused trying to code a button after dates have been entered in two boxes - Start Date and End Date
On opening the form the cmd button (View Reports) is disabled. The user enters dates in the Start and End date boxes, once this is done the cmd button enables.
However if they decide to clear the dates (using another cmd button 'clear Dates') then I need the View Reports button to go back to being disabled.
I have tried the following on lost focus, on change ect but noting seems to work!
Code:
'Enables Cmd View Report if dates have been entered
If Me.txtDateStart.Value = "" And Me.txtDateEnd.Value = "" Then
Me.cmdViewReport.Enabled = False
Else
Me.cmdViewReport.Enabled = True
End If
any advice greatfully recieved - many thanks