Problem with automatically opening a form

randypuppy

Registered User.
Local time
Today, 09:05
Joined
Feb 17, 2001
Messages
13
I've set a form so that it opens when the database opens. I've also set it so that the database window is not displayed.

Is there a way that I can include a button on my form which will open the database window?
 
By the way, you may want to incorporate a password into your command button. Here is an example of using the code from the thread I posted above with some more to prompt the user for a password before the database window is shown.

Dim PassWord As String

' Asks for password
PassWord = InputBox("Enter Password", "Password Required")

' Current password
If PassWord = "PassWord" Then

' Show command bars to user
CommandBars.Item(32).Enabled = True

' Show database window to user
DoCmd.SelectObject acTable, , True

Else

' Message to display when password does not match password from this sub
MsgBox "You are not authorized to edit database", vbExclamation, _
"Edits not allowed"

End If

Just replace the "PassWord" with whatever you want to use as yours and it should work for you.

[This message has been edited by Talismanic (edited 04-27-2001).]
 

Users who are viewing this thread

Back
Top Bottom