Show that Edit Records Button has been Pressed

  • Thread starter Thread starter Patrick Graham
  • Start date Start date
P

Patrick Graham

I have an Edit Records button.

I want a professional looking way to indicate that the
form is now in a mode where edits can take place.

(Right now I have a box around the form that turns red
and thickens, I think it looks tacky)

I've fooled around a bit but dont like anything I've done.

Some of my ideas I couldn't code :(

Can I get some suggestions and coding to go with them?

Thanks alot.
 
Patrick Graham said:
I have an Edit Records button.

I want a professional looking way to indicate that the
form is now in a mode where edits can take place.

(Right now I have a box around the form that turns red
and thickens, I think it looks tacky)

I've fooled around a bit but dont like anything I've done.

Some of my ideas I couldn't code :(

Can I get some suggestions and coding to go with them?

Thanks alot.

One thing I've done in similar situations is toggle the caption of the
command button itself, and have the code in the button take a different
path depending on whether the form is "Locked" or "Unlocked". For
example:

'----- start of sample code -----
Private Sub cmdLockUnlock_Click()

On Error GoTo Err_Handler

If Me.cmdLockUnlock.Caption = "Unlock" Then
Me.AllowEdits = True
Me.AllowAdditions = True
Me.AllowDeletions = True
Me.cmdLockUnlock.Caption = "Lock"
Else
If Me.Dirty Then RunCommand acCmdSaveRecord
Me.AllowEdits = False
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.cmdLockUnlock.Caption = "Unlock"
End If

Exit_Point:
Exit Sub

Err_Handler:
MsgBox Err.Description, vbExclamation, "Error " & Err.Number
Resume Exit_Point

End Sub
'----- end of sample code -----
 
Back
Top