Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switchboard Problems!!!!

Status
Not open for further replies.

Kckronic21

Programmer
Jul 29, 2001
81
US
I have a problem. I have created a switchboard that goes to 3 different menus. On the main switchboard, the first button goes to All Employees. The Second button goes to Permanent Employees and the third button goes to Probationary Employees. What I would like to do is to have a textbox on the switchboard that changes when one of the 3 buttons is pressed. For example: If I press the All Employees button, I want the textbox to say All Employees. Please tell me how to do this. Thanks!
 
Make 3 different label's that you want to show depending on what button is pressed.
Place all 3 fields on the switchboard one over another. Make them all of the
same size, color, font etc. because it will look better. Set "Visible" in the property
of the filed to "No" for all of the 3 fields.
Now let's say that you have 3 command buttons named "Command1", "Command2" and
"Command3" and that the labels you want to show are named "Label1", "Label2" and
"Label3".
Assign this to the "OnClick" property of the "Command1" button:

Me![Label1].Visible = True

Assign this to the "OnClick" property of the "Command2" button:

Me![Label2].Visible = True

Assign this to the "OnClick" property of the "Command3" button:

Me![Label3].Visible = True

Now when you click on the button "Command1" the "Label1" will be shown on the form.

Assign this to the "On Activate" property of the "Switchboard" form:

Me![Label1].Visible = False
Me![Label2].Visible = False
Me![Label3].Visible = False

That will make that fields invisible when the form again get the focus when you close
the other form that was opened using the button's.
I hope this will help.

Rgrds
Sale
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top