View Full Version : Dynamic Tab Control/List Box


GUIDO22
07-18-2007, 12:07 AM
I need to dynamically size a tab control with a list box in each depending upon the number of employees in a table. So, if there are five employees - five pages on the control will be created and on each page a listbox that represents the job allocation for each employee.

Is this possible in Access (i am using 97 - hope to upgrade soon)

Thank you.

Dennisk
07-18-2007, 12:14 AM
it is possible but I certainly would not go that route. What happens if the number of staff increases to 25 or 30 you just would not that screen with to accommodate all the tabbed pages.

I would re-think your form design

GUIDO22
07-18-2007, 12:23 AM
it is possible but I certainly would not go that route. What happens if the number of staff increases to 25 or 30 you just would not that screen with to accommodate all the tabbed pages.

I would re-think your form design

It will NEVER go beyond more than 8 staff as we do not have facilites at present to accomodate more than this!

I wish to illustrate all contracts on the form with a list view/box to represent the current month. From this list view I wish to drag/drop (using code from this forum) to allocate items from the month view to each employee on their own list view/box.

Do you know a better way to do this - something similar that would achieve the same end result?

The_Doc_Man
07-18-2007, 08:47 AM
Look into the search topic "Cascasing Combo Boxes" as a way to first select your employee and THEN bring up your list of contracts.

Create a sub-form for the list. Have the form limit itself to a particular person. Make that person a "Parameter" - see Access Help and also search this forum for "Parameter" queries.

Select the person from a list on the main form. Using an AfterUpdate event from the combo box that selects person, feed the name to the parameter on the subform and requery the subform.

Or something like that, anyway.

Rich
07-18-2007, 08:50 AM
Create 8 tabs and then hide the redundant ones

GUIDO22
07-19-2007, 01:25 AM
Look into the search topic "Cascasing Combo Boxes" as a way to first select your employee and THEN bring up your list of contracts.

Create a sub-form for the list. Have the form limit itself to a particular person. Make that person a "Parameter" - see Access Help and also search this forum for "Parameter" queries.

Select the person from a list on the main form. Using an AfterUpdate event from the combo box that selects person, feed the name to the parameter on the subform and requery the subform.

Or something like that, anyway.

This is not the way I wish the form to work - the contracts must be available in month view first - with access to all employees job allocation in the lower part of the form design. TO allocate a contract will mean simply dragging the contract in question from the month list to the specific individuals list.......hence, selecting the employee first is not the way I wish this to work. I wish to mirror a 'planning board' type scenrio where plastic sliders are moved from one row on the board to another row signifying the employees allocated tasks.....

GUIDO22
07-19-2007, 01:26 AM
Create 8 tabs and then hide the redundant ones

Thanks Rich - hadn't thought of that - (this is the simplest solution!)