aut generate tab

D

deb

Access 2003

I have a form called f018ContrPerf

Is it possible for a tab to be auto created for each UnitNo field I have
within a record?
The tab should contain a form called fUnit and the PK is ProjectID, and
UnitNo?

i.e.
if I display a project record with 2 unitNo's then a two tabs are created
with the fUnit form in the tab areas. The fUnit forms will display the
specific data on eahc unitNo

if I display a project with 3 unitNo's then three tabs will be created...
and so on
 
A

Allen Browne

You can't generate more tab pages at runtime.

It would be possible to set up the form at design time so that the tab
control has the maximum number of pages you could want, and then write code
in the form's Current, AfterInsert, and AfterDelConfirm events to hide the
pages you don't need.

If you are not comfortable writing code like that, you could just put an
unbound combo box on your form, before the main form record, and above the
subform where you have the related records. Include the combo's name in the
subform's LinkMasterFields property, and the UnitNo field in
LinkChildFields. Then you just choose the unit number in the combo, and the
subform shows that unit.
 

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