Connecting Tech Pros Worldwide Forums | Help | Site Map

Many-to-one form/subform question

Andrew
Guest
 
Posts: n/a
#1: Nov 13 '05
I've got two tables in my DB, a Client table and an Event table.
There are many events for each client. The form I designed is based
off of the Client table and the subform within it is sourced from the
Event table.

The way things are currently designed places a list of clients on the
left side of the form, and then there's a subform on the right side of
the main form with fields to enter event information.

What I'd like to have happen is to simply select a client name from
the left side, enter the event information on the right, and then move
on selecting other clients, etc. Right now I have a list box
providing the client list. Is this right? I know there's an option
when using the listbox wizard that involves using a record selected in
the list box for other functions, but I can't figure out how that
works exactly.

Thanks,
Andrew

Paul
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Many-to-one form/subform question


You need 3 tables: Client, Event & Match

Take the primary key from the Client and Event tables and add them to the
Match Table and set both keys to be primary, so you don't get duplicated
entries.
Make sure you set up your relationship window to have the joins active

ClientTable MatchTable EventTable
ClientID------------ClientID /---- EventID
Eventid-----------/

Then make a form with 2 combo (one for client and the other for event).

Thats it. There is a more elegant method, but this quick-and-dirty method
should get you where you need to be.

HTH
Paul

"Andrew" <spidrw@gnt.net> wrote in message
news:d8c667d9.0411011056.f430322@posting.google.co m...[color=blue]
> I've got two tables in my DB, a Client table and an Event table.
> There are many events for each client. The form I designed is based
> off of the Client table and the subform within it is sourced from the
> Event table.
>
> The way things are currently designed places a list of clients on the
> left side of the form, and then there's a subform on the right side of
> the main form with fields to enter event information.
>
> What I'd like to have happen is to simply select a client name from
> the left side, enter the event information on the right, and then move
> on selecting other clients, etc. Right now I have a list box
> providing the client list. Is this right? I know there's an option
> when using the listbox wizard that involves using a record selected in
> the list box for other functions, but I can't figure out how that
> works exactly.
>
> Thanks,
> Andrew[/color]


Closed Thread