Hiding the Database Window

  • Thread starter Thread starter Joey
  • Start date Start date
J

Joey

I have an app that I want to conditionally Hide or Display
the Database Window. For instance, in the main menu form
that opens when the app is opened, I grab the network id
of the person who is opening the app and grant certain
rights to open forms based on if that person has "Admin"
rights. I want to show the Database Window and if that
person has "Admin" rights, I want to hide the Database
Window if they don't. The app is on a network drive saved
as an xxx.MDE file. How can I do this in code?????
 
Joey said:
I have an app that I want to conditionally Hide or Display
the Database Window. For instance, in the main menu form
that opens when the app is opened, I grab the network id
of the person who is opening the app and grant certain
rights to open forms based on if that person has "Admin"
rights. I want to show the Database Window and if that
person has "Admin" rights, I want to hide the Database
Window if they don't. The app is on a network drive saved
as an xxx.MDE file. How can I do this in code?????

Sub ShowDbWindow()
DoCmd.SelectObject acTable, , True
End Sub

Sub HideDbWindow()
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
End Sub
 
Back
Top