B
Barry A&P
Because i cant get allen brownes "LockBoundControls" to work with this form.
(although it works wonderfully for me in many other instances) I would like
to disable the record selectors or possibly the allow additions to prevent
copying and pasting a new record to a locked form wich then locks access
because of a index violation wich cant be fixed because the form is locked..
after trying to close the form 10 times a message is finally displayed that
says the record can not be saved and the form closes..
Please see the code below
this line works fine.. Me![F_Parts_Browse_All].Locked = bLock
however all of the others give me a runtime error 438 (object does not
support this property or method.. i feel like i have tried every reference in
the book
Private Sub cmdLock_Click()
Dim bLock As Boolean
bLock = IIf(Me.cmdLock.Caption = "&Lock", True, False)
If bLock = True Then
Me!cmdLock.Caption = "Un&Lock"
Else
Me!cmdLock.Caption = "&Lock"
End If
'Me.F_Parts_Browse_All.Description.Enabled = Not bLock
'Me![F_Parts_Browse_All].AllowAdditions = False
Me![F_Parts_Browse_All].Locked = bLock
'Me![F_Parts_Browse_All]!Properties.RecordSelectors.Visible = bLock
'Me![F_Parts_Browse_All].AllowEdits = Not bLock
End Sub
Thank you for your help
Barry
(although it works wonderfully for me in many other instances) I would like
to disable the record selectors or possibly the allow additions to prevent
copying and pasting a new record to a locked form wich then locks access
because of a index violation wich cant be fixed because the form is locked..
after trying to close the form 10 times a message is finally displayed that
says the record can not be saved and the form closes..
Please see the code below
this line works fine.. Me![F_Parts_Browse_All].Locked = bLock
however all of the others give me a runtime error 438 (object does not
support this property or method.. i feel like i have tried every reference in
the book
Private Sub cmdLock_Click()
Dim bLock As Boolean
bLock = IIf(Me.cmdLock.Caption = "&Lock", True, False)
If bLock = True Then
Me!cmdLock.Caption = "Un&Lock"
Else
Me!cmdLock.Caption = "&Lock"
End If
'Me.F_Parts_Browse_All.Description.Enabled = Not bLock
'Me![F_Parts_Browse_All].AllowAdditions = False
Me![F_Parts_Browse_All].Locked = bLock
'Me![F_Parts_Browse_All]!Properties.RecordSelectors.Visible = bLock
'Me![F_Parts_Browse_All].AllowEdits = Not bLock
End Sub
Thank you for your help
Barry