Private Sub Command47_Click()
On Error GoTo Err_Command47_Click
If Me.Command47.Caption = "Add Customer" Then
'Add Customer enable save button and turn name to cancel
DoCmd.GoToRecord , , acNewRec
Me.sav_btn.Enabled = True
Me.Command47.Caption = "Cancel"
Me.Previous.Enabled = False
Me.Next.Enabled = False
Me.Command26.Enabled = False
Me.Command25.Enabled = False
Exit_Command47_Click:
Exit Sub
Err_Command47_Click:
MsgBox Err.Description
Resume Exit_Command47_Click
Else
'Cancel everything
If Me.Dirty Then
Me.Undo
End If
Me.sav_btn.Enabled = False
Me.Command47.Caption = "Add Customer"
Me.Requery
End If
End Sub
I recently used the following code for my add customer form and it was working perfect! When the user clicked on add customer button the save button would enable (its disabled when the form opens) and the add customer button would the change to 'cancel', plus all other navigation buttons would be disable untill cancel was clicked again. (menu, previous, next & search) Now when the add customer button is clicked the save button is being enabled but when cancel is clicked the rest of the buttons are staying disabled, they would normally go back to normal. I checked with the properties for the from and navigational buttons are enabled, the code that is above is whats there, im thinking it might be something in the form properties ???? Whats even more strange is I had a back -up of the database so I thought i would just replace the form and move on, but to my dismay that one is doing the same thing !!!
Can someone please advise
THE STUDENT