switchboard design issues

P

Patrick

I am using access 2002. I have 3 switchboards created in my database and am
wondering how to change the design on them. If I change the design, like
adding a text box on my switchboard it carries over to all the switchboards.
How do I make each switchboard individual to each other?
 
B

Beetle

When you say you have 3 switchboards, I assume you mean you have one
switchboard with 3 different "menus". When you create a switchboard with the
switchboard manager, Access automatically creates a table called Switchboard
Items. This table will have a field called SwitchboardID which assigns a
number to each menu of your switchboard (The main menu will be ID #1, first
sub menu will be ID # 2 , etc.)

Add another text box to you switchboard form called txtFilter (or whatever)
and set it's visible property to false and it's control source to
SwitchboardID of the table. Then add some code like the following to the On
Current event of your switchboard form (modify to fit the names of your
actual controls)

Select Case Me.txtFilter

Case 1

Me.YourOtherTextBox.Visible = True

Case 2

Me.YourOtherTextBox.Visible = False

Case 3

Me.YourOtherTextBox.Visible = False

End Select

Post back if I misunderstood your post or if you have other questions

HTH
 
P

Patrick

Thank you

Beetle said:
When you say you have 3 switchboards, I assume you mean you have one
switchboard with 3 different "menus". When you create a switchboard with the
switchboard manager, Access automatically creates a table called Switchboard
Items. This table will have a field called SwitchboardID which assigns a
number to each menu of your switchboard (The main menu will be ID #1, first
sub menu will be ID # 2 , etc.)

Add another text box to you switchboard form called txtFilter (or whatever)
and set it's visible property to false and it's control source to
SwitchboardID of the table. Then add some code like the following to the On
Current event of your switchboard form (modify to fit the names of your
actual controls)

Select Case Me.txtFilter

Case 1

Me.YourOtherTextBox.Visible = True

Case 2

Me.YourOtherTextBox.Visible = False

Case 3

Me.YourOtherTextBox.Visible = False

End Select

Post back if I misunderstood your post or if you have other questions

HTH
 
C

carnivaljones

Thank you















- Show quoted text -

Thank you for the method Beetle, saved me on one of my projects!

You can reference the Switchboard ID in code like so (I believe the
'.value' is the default, but I use it because I like to be explicit):
Me.[Switchboard ID].Value

So you wouldn't need to add an invisible text box with the Switchboard
ID as the control source. Thus, the code in your OnCurrent function
would look like this:

Select Case Me.[Switchboard ID].Value

Case 1
TxtBox.Visible = True

Case 2
TxtBox.Visible = False

[And so forth...]

End Select
 

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