May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.
and this in a private sub:
Private Sub Form_Current() DisableControls End Sub
Private Sub DisableControls() On Error GoTo Err_DisableControls If DLookup("[SecurityLevel]", "LOCALtblCurrentUser") > 2 Then Dim ctl As Control For Each ctl In Me.Controls Select Case ctl.ControlType Case acComboBox If ctl.Name <> "cboFindRecord" Or ctl.Name <> "cboPartN" Then ctl.Locked = True Case acCommandButton If ctl.Name <> "cmdMainMenu" Or ctl.Name <> "cmdGridView" Then ctl.Locked = True Case acTextBox If ctl.Name <> "txtCompanyID" Then ctl.Locked = True End Select Next End If Exit_DisableControls: Exit Sub Err_DisableControls: MsgBox "Error Number: " & Err.Number & vbCrLf & "Error Description: " & Err.Description & vbCrLf & "Error Source: " & Err.Source Resume Exit_DisableControls End Sub But when the form opens I get an error... Error #438. Object doesn't support this property or method.
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Return Data From Website in Access||6||59|
|Cant delete records in query||8||50|
|ICT security firms and audit/assurance offerings||3||39|
|Opening a PDF or RTF file created from an Access application||3||15|
Join the community of 500,000 technology professionals and ask your questions.