From: Daedalus on
Hi all



In my db I have (a.o.) 2 tables, one is 'teams' & the other is 'employees'.



Table 'Teams'

ID_Team (AutoNum)

TeamName

TeamMgr



Table 'Employees'

ID_Employee (AutoNum)

EmployeeName

TeamID



I've made a form to maintain 'employees', in which I can a.o. assign to one
of the teams.



What I need now is a form with the teams, containing a subform with the
employees of the (current) team. To display this, there's no prob.

But how can I add/remove employees to/from a team, without affecting
(deleting from) the 'employee'-table (except changing the field TeamID)

Is there any hope for me? Or do I have to use a 'linking' table (in which
case I have a prob, since an employee can be part of only one team at a
time) ?




Yours truly



D


From: Salad on
Daedalus wrote:
> Hi all
>
>
>
> In my db I have (a.o.) 2 tables, one is 'teams' & the other is 'employees'.
>
>
>
> Table 'Teams'
>
> ID_Team (AutoNum)
>
> TeamName
>
> TeamMgr
>
>
>
> Table 'Employees'
>
> ID_Employee (AutoNum)
>
> EmployeeName
>
> TeamID
>
>
>
> I've made a form to maintain 'employees', in which I can a.o. assign to one
> of the teams.
>
>
>
> What I need now is a form with the teams, containing a subform with the
> employees of the (current) team. To display this, there's no prob.
>
> But how can I add/remove employees to/from a team, without affecting
> (deleting from) the 'employee'-table (except changing the field TeamID)
>
> Is there any hope for me? Or do I have to use a 'linking' table (in which
> case I have a prob, since an employee can be part of only one team at a
> time) ?
>
>
>
>
> Yours truly
>
>
>
> D
>

What happens if you have a button to open another form or an inputbox
that asks which team to move the current employee to. Then run an
update query that updates the employee record to the new team number and
if needed requeries the subform?