Button to toggle menu visible

J

Jake F

I'm trying to creat a button to toggle between the main menu being visible or
not. I tried using if/then but I'm guessing the main part of "If" is
incorrect because clicking on the button has no effect right now. Any help
would be great. Thanks.

Private Sub Command28_Click()
On Error GoTo Err_ExitCommand28_Click
If acCmdWindow.Visible = True Then
DoCmd.RunCommand acCmdWindowHide
Else
DoCmd.SelectObject acTable, , True
Exit_Command28_Click:
Exit Sub
Err_Command28_Clinck:
MsgBox Err.Description
Resume Exit_Command28Click
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top