Switchboard Button

B

Beeyen

Good Day,

I have a form with five tabs. I have a switchboard with four command
buttons but would like one of the command buttons to open without being able
to see one of the tabs in the form. Is there a way to do this?

I tried the coding below in the form but the tab was removed for all of the
command buttons or anytime you open the form.

Private Sub Form_Activate()
Me.(Name of the Tab).visible=False

End Sub

Thank for your assistance
 
D

Damon Heron

On your commandbutton click event on the Switchboard form:
Private Sub Command0_Click()
DoCmd.openform "Your form name", , , , , , "A" 'this can be anything you
want
End Sub

On your form open event with the tabs:

If Me.OpenArgs = "A" Then
Me.[YourTabName].Visible = False
End If


Damon
 
B

Beeyen

Thanks,

It worked!

Have a nice evening.

Damon Heron said:
On your commandbutton click event on the Switchboard form:
Private Sub Command0_Click()
DoCmd.openform "Your form name", , , , , , "A" 'this can be anything you
want
End Sub

On your form open event with the tabs:

If Me.OpenArgs = "A" Then
Me.[YourTabName].Visible = False
End If


Damon



Beeyen said:
Good Day,

I have a form with five tabs. I have a switchboard with four command
buttons but would like one of the command buttons to open without being
able
to see one of the tabs in the form. Is there a way to do this?

I tried the coding below in the form but the tab was removed for all of
the
command buttons or anytime you open the form.

Private Sub Form_Activate()
Me.(Name of the Tab).visible=False

End Sub

Thank for your assistance
 

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

Top