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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syncronize Form With A Tab Control

Status
Not open for further replies.

miletracker

Technical User
Apr 21, 2002
46
0
0
US
I Would like to do the following : 2 tables named "catagories" and "items" linked to a form that would contain a combo with catagories and a 2 page tab control 1st page would contain a subform or continues form with items filtered by the catagory combo and the second page (this is where I snag) would contain details for the item name the user selects in the first page of the tab control. the details are in the same table as the name but there are to many fields for a continues form
any suggestions
Miletracker
 
Create a text box with the control source property set to the primary key in the continious form
EG
=[YourContForm].Form!ID

Call this text box TxtShowID

Now set the link master and child properties of your subform in single form view

LinkMasterFields = TxtShowID
LinkChildFields = ID

this should now show the item select in the contionious form in tab 1 on the sngle foem on tab2

Cheers

Jimmy
 
I shall try that later busy right now thanks for the reply
miletracker
 
Jimmy that Works Correctly (and Easy!)
Thanks Again Miletracker
 
Miletracker
On entering the single form you might want to check that a record has been selected from the continios form in TAb1, to avoid orphan data.

I use a module called nodata to set the focus away from the single form an back to say your combo box



Private Sub NoData()
Dim ctlText As Control
If Me![YourContForm].Form![ID] <> &quot;&quot; Then
Else
MsgBox (&quot;No client selected&quot;)
Set ctlText = Me![YourComboBox]
ctlText.SetFocus
End If
End Sub


on the onenter property of the single form just ust the command
call nodata
to call the module

cheers


Jimmy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top