Olá,
No topico 102 codigos para access eu tentei utilizar a seguinte função:
Public Function DesabilitaTudo()
On Error GoTo Err_DesabilitaTudo
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
DoCmd.ShowToolbar "Database", acToolbarNo
DoCmd.ShowToolbar "Relationship", acToolbarNo
DoCmd.ShowToolbar "Table Design", acToolbarNo
DoCmd.ShowToolbar "Table Datasheet", acToolbarNo
DoCmd.ShowToolbar "Query Design", acToolbarNo
DoCmd.ShowToolbar "Query Datasheet", acToolbarNo
DoCmd.ShowToolbar "Form Design", acToolbarNo
DoCmd.ShowToolbar "Form View", acToolbarNo
DoCmd.ShowToolbar "Filter/Sort", acToolbarNo
DoCmd.ShowToolbar "Report Design", acToolbarNo
DoCmd.ShowToolbar "Print Preview", acToolbarNo
DoCmd.ShowToolbar "Toolbox", acToolbarNo
DoCmd.ShowToolbar "Formatting (Form/Report)", acToolbarNo
DoCmd.ShowToolbar "Formatting (Datasheet)", acToolbarNo
DoCmd.ShowToolbar "Macro Design", acToolbarNo
DoCmd.ShowToolbar "Utility 1", acToolbarNo
DoCmd.ShowToolbar "Utility 2", acToolbarNo
DoCmd.ShowToolbar "Web", acToolbarNo
DoCmd.ShowToolbar "Source Code Control", acToolbarNo
DoCmd.ShowToolbar "Visual Basic", acToolbarNo
DoCmd.ShowToolbar "Ribbon", acToolbarNo
Application.CommandBars.DisableAskAQuestionDropdown = True
Exit_DesabilitaTudo:
Exit Function
Err_DesabilitaTudo:
If Err.Number = 2094 Then
Resume Next
Else
MsgBox Err.Number & " - " & Err.Description
Resume Exit_DesabilitaTudo
End If
End Function
Porém eu tentei coloca-la no evento ao abrir do formulário principal para que ela desabilitasse tudo e o usuário interagisse somente com os formulários, porém não consegui. Alguém pode me ajudar?
No topico 102 codigos para access eu tentei utilizar a seguinte função:
Public Function DesabilitaTudo()
On Error GoTo Err_DesabilitaTudo
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
DoCmd.ShowToolbar "Database", acToolbarNo
DoCmd.ShowToolbar "Relationship", acToolbarNo
DoCmd.ShowToolbar "Table Design", acToolbarNo
DoCmd.ShowToolbar "Table Datasheet", acToolbarNo
DoCmd.ShowToolbar "Query Design", acToolbarNo
DoCmd.ShowToolbar "Query Datasheet", acToolbarNo
DoCmd.ShowToolbar "Form Design", acToolbarNo
DoCmd.ShowToolbar "Form View", acToolbarNo
DoCmd.ShowToolbar "Filter/Sort", acToolbarNo
DoCmd.ShowToolbar "Report Design", acToolbarNo
DoCmd.ShowToolbar "Print Preview", acToolbarNo
DoCmd.ShowToolbar "Toolbox", acToolbarNo
DoCmd.ShowToolbar "Formatting (Form/Report)", acToolbarNo
DoCmd.ShowToolbar "Formatting (Datasheet)", acToolbarNo
DoCmd.ShowToolbar "Macro Design", acToolbarNo
DoCmd.ShowToolbar "Utility 1", acToolbarNo
DoCmd.ShowToolbar "Utility 2", acToolbarNo
DoCmd.ShowToolbar "Web", acToolbarNo
DoCmd.ShowToolbar "Source Code Control", acToolbarNo
DoCmd.ShowToolbar "Visual Basic", acToolbarNo
DoCmd.ShowToolbar "Ribbon", acToolbarNo
Application.CommandBars.DisableAskAQuestionDropdown = True
Exit_DesabilitaTudo:
Exit Function
Err_DesabilitaTudo:
If Err.Number = 2094 Then
Resume Next
Else
MsgBox Err.Number & " - " & Err.Description
Resume Exit_DesabilitaTudo
End If
End Function
Porém eu tentei coloca-la no evento ao abrir do formulário principal para que ela desabilitasse tudo e o usuário interagisse somente com os formulários, porém não consegui. Alguém pode me ajudar?