| re: how to enter many to one
The form embedded in the subform control will be based on a query joining
the SalesSalesperson table with the Salesperson table. The foreign keys in
SalesSalesperson will point to the Sales record and to the Salesperson
record (for information like, Salesperson's name).
It would be in the SalesSalesperson record, the one that ties a particular
Salesperson to a particular Sale, that the salesperson's contribution to
this sale would be stored. I am assuming different salespeople can make
different contributions to a given sale, and not necessarily the same
contribution to some other sale.
Use a ComboBox to select the Salesperson, and a textbox to enter the
contribution. The Salesperson Name will be displayed in the ComboBox, but
the id field of that salesperson will be stored. The Combo Box wizard will
lead you by the hand through setting it up.
If that doesn't help, please clarify what is not clear and I'll try to
respond.
Larry Linson
Microsoft Access MVP
"RR" <texson552000@yahoo.com> wrote in message
news:6uB4d.16458$Qb.12905@fe2.texas.rr.com...[color=blue]
> Could you explain the last paragraph in a different way? I think I
> understand the first part, but not the last.
> Your salessalesperson table will have filelds for their "costs" to the[/color]
sale?[color=blue]
> "Larry Linson" <bouncer@localhost.not> wrote in message
> news:XmB4d.8944$Bg5.2797@trnddc07...[color=green]
> > First, you'd need your tables properly designed... a Sales table, a
> > Salesperson table, and a SalesSalesperson table. What you have is not a
> > "many to one" but a "many to many" -- that is multiple salespeople per[/color]
> sale,[color=green]
> > but a salesperson can also be involved in multiple sales.
> >
> > The SalesSalesperson table would have foreign keys pointing to the[/color][/color]
record[color=blue]
> in[color=green]
> > the Sales table, and to a single Salesperson. But there could be (will[/color][/color]
be)[color=blue][color=green]
> > many entries in the SalesSalesperson table for a given sale or a given
> > salesperson.
> >
> > For a particular sale, I'd use a Subform whose RecordSource was a Query[/color][/color]
on[color=blue][color=green]
> > the SalesSalesperson table, joined to the Salesperson table. I'd use a
> > ComboBox in the Form embedded in the Subform Control to choose the
> > salesman... you may want/need to use some VBA code to create the new[/color][/color]
entry[color=blue][color=green]
> > in the SalesSalesperson table and to requery the Form embedded in the
> > Subform Control.
> >
> > Larry Linson
> > Microsoft Access MVP
> >
> >
> >
> > "RR" <texson552000@yahoo.com> wrote in message
> > news:dvA4d.16454$Qb.2086@fe2.texas.rr.com...[color=darkred]
> > > What would the proper way be to enter a sale, then be able to enter 1[/color][/color][/color]
or[color=blue][color=green][color=darkred]
> > > more sales persons, their "costs" to the sale, and their commission on[/color][/color]
> the[color=green][color=darkred]
> > > sale?
> > > Then after its been entered, have all the information show up as a[/color][/color][/color]
part[color=blue]
> of[color=green][color=darkred]
> > > the sale?
> > >
> > >[/color]
> >
> >[/color]
>
>[/color] |