Robert Francis
asked on
Problem enabling button after record update Access 2007
I have a form that uses the following code when it loads:
Then does this when a change is made:
This works great. Problem is I have a button for saving the record and adding another:
All of the .visible code is working but I cant make it enable and disable the buttons back to the way they were when the form loaded the first time.
Private Sub Form_Current()
Me!btn_cancel_time.Enabled = False
Me!btn_nevermind_time.Enabled = True
End Sub
Then does this when a change is made:
Private Sub Form_Dirty(Cancel As Integer)
Me!btn_cancel_time.Enabled = True
Me!btn_nevermind_time.Visible = False
End Sub
This works great. Problem is I have a button for saving the record and adding another:
Private Sub btn_add_time_Click()
DoCmd.GoToRecord acDataForm, "time_entry", acNewRec
Me.tar_abs.Visible = False
Me.excused.Visible = False
Me.reason.Visible = False
Me.Label44.Visible = False
Me.Label46.Visible = False
Me.Label48.Visible = False
Me!btn_cancel_time.Enabled = False
Me!btn_nevermind_time.Enabled = True
End Sub
All of the .visible code is working but I cant make it enable and disable the buttons back to the way they were when the form loaded the first time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.