Hi,
I want to lock or unlock current record in continous form. I know that is probably impossible, but I'm looking for some ideas on how could I accomplish this, at least in way
that User would think only his selected record is being unlocked.
I have tried some form_current events, but seems like It's not working for my case, since my design is a little bit different that ones posted in forums.
Here It is (sample picture but same design in my DB - lock button is toggle button, not bounded to table, just added in design of detail section ):
So far I tried this :
Code:
Private Sub Form_Load()
'On open lock all fields and set Toggle to True
Me.Name.Locked = True
Me.Description.Locked = True
Me.Date_Of_Entry.Locked = True
Me.HyperLink.Locked = True
Me.Toggle1.Value=True
End Sub
Code:
Private Sub Toggle1_Click()
If Toggle1.Value = False Then
Me.Name.Locked = False
Me.Description.Locked = False
Me.Date_Of_Entry.Locked = False
Me.HyperLink.Locked = False
ElseIf Toggle1.Value = True Then
Me.Name.Locked = True
Me.Description.Locked = True
Me.Date_Of_Entry.Locked = True
Me.HyperLink.Locked = True
End If
End Sub
This is a simple code which works, only problem is that all toggle buttons change their True/False state when user clicks on It. Desirable would be that only current record's Toggle would change (different color and option too).
So, as I said, I'm loking something that would look like It's unlocking/locking only current record in continous form, toggle button can be moved outside form too (but then focus to current record is a problem).
Any help appreciated, or suggestions for different design to achieve locking/unlocking current records, thank you in advance !!