tab controls

sdonovan

New member
Local time
Today, 07:52
Joined
Dec 9, 2002
Messages
7
I have a contacts db I am working on. The main form has a tab control showing the following headers on the top row:

Base/Contacts/Server/TCNO/Equipment.

I have a combo box (cboBase_Name) outside of the tab control to select my base and I want each tab control to show the relevant info for each.

For example the Base tab show the current shipping address. The Contacts tab shows each point of contact (POC) for that base, example primary and alternate Finance POC or System POC. The Server tab would show the model server, IP address, Service tag, etc.... You get the picture.

I only want one combo box and don't want to use a multi-column combo to display data in my txtBoxes, ie:

Me.txtMajcom_POC = Me![cboContact].Column(1)
Me.txtMajcom_Email = Me![cboContact].Column(2)
Me.txtMajcom_DSN = Me![cboContact].Column(3)

I have been that route already.

I also want to have cmdAdd, cmdEdit and cmdSave buttons outside of my tab control to allow updates to the information from the tab control.

Did I make this clear enough?

Any suggestions.
 
Last edited:
Clear enough

Make the form the tab is on based on a query. Have that query's criteria set to the combo box. On the AfterUpdate event for the combo requery the form.

Then on each tab set its master/child link fields to that of the id for the main form.

If that is not clear enough let me know and I will pass you a sample.
 
If it is not to much trouble please, an example would be very helpful.
 
Sample

Made this up in a hurry and did it in 97 since I was unsure which version you had. It should convert without any problem.

Notice that the master form is based on a query and that that query's criteria is set to the combo box on the master form. Coding on the OnChange event requeries the form and gives the ID that you want.

The sub forms on the tabs have their master/child link set to the GolferID so as the master form changes so do the contents of the tabs.

Hope it helps.
 

Users who are viewing this thread

Back
Top Bottom