Database Window

law

Registered User.
Local time
Today, 13:18
Joined
Feb 14, 2004
Messages
26
I have got the vb code below for a clck event, to display the database window but it isnt working. And I HAVE A COMMAND button to click as you can see below to open the window so pressing F11 is no good as I need this command button to trigger the event. I am getting an error when I click the command button?


Private Sub cmdDisplayDatabaseWindow_Click()
DoCmd.SelectObject acTable, , True
End Sub

I thought this was all the code you need to display the window when using a command button? ( I dont have any macros setup with this or anything else)

Thanks
 
DoCmd.SelectObject acTable, , True

That command does work to display the database window. It will not display the database window IF the forms "PopUp" or "Modal" property is set to YES. That is the purpose of those two properties is to keep the form on top.

HTH
 
I have made sure that the properties of the form have modal & popup set to "NO" but it still wont work when I click on the button I am still getting an error the code is shown below that is with the command button that I want to click to display the database windoe

DoCmd.SelectObject acTable, , True

any ideas please?
 
Got that working now, thanks very much for your help!
 
I am glad you have solved your problem.

What exactly was the problem? What did you have to modify to get the command to work?
 
I just created a new form & copied all of the command buttons from the current form to the new form & under the command button just entered the same vb code as seen above & it worked.
Even though the popup & modal where set to "No" it still never worked.
 

Users who are viewing this thread

Back
Top Bottom