Angello Pimental
05-10-2001, 06:40 AM
How can I create a toggle button that will allow a user to lock or unlock the record for editing??
Does anyone know??
Does anyone know??
|
View Full Version : Toggle RecordLocks Angello Pimental 05-10-2001, 06:40 AM How can I create a toggle button that will allow a user to lock or unlock the record for editing?? Does anyone know?? Rich 05-10-2001, 07:13 AM Me.AllowEdits=True added to a command button. HTH KevinM 05-10-2001, 08:08 AM Rich, but that won't toggle back to AllowEdits=False. Angello try this.... Create a cmdButton and put "LOCK RECORDS" in it's Caption. Then use this OnClick Event cmdbutt_Click() If cmdbutt.Caption="LOCK RECORDS" Then Me.AllowEdits=False cmdbutt.Caption="UNLOCK RECORDS" Else Me.AllowEdits=True cmdbutt.Caption="LOCK RECORDS" End If HTH Angello Pimental 05-10-2001, 08:44 AM The command button works in that it toggles between LOCK RECORD and UNLOCK RECORD... but you can still edit the record no matter when... What am I doing wrong? Angello Pimental 05-10-2001, 08:55 AM Ignore my post before..... I have changed the cmdbutton to UNLOCK instead of LOCK... It works to the point that I can't edit the record until I push UNLOCK..then I can edit. Put once I push LOCK..it does not lock... What else do I need to do? KevinM 05-10-2001, 01:52 PM Sorry missed out Me.Refesh... If cmdbutt.Caption = "LOCK RECORDS" Then Me.AllowEdits = False cmdbutt.Caption = "UNLOCK RECORDS" Me.Refresh Else Me.AllowEdits = True cmdbutt.Caption = "LOCK RECORDS" Me.Refresh End If HTh Angello Pimental 05-11-2001, 05:10 AM Brilliant..... Thank you Kevin M |