Re: How can I add a row from a form?
- From: John Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 08 Dec 2005 13:05:17 -0700
On Wed, 7 Dec 2005 23:48:02 -0800, "Lars"
<Lars@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>
>There are different tables:
>Jobs: Which customer gets which product, and which consultant is doing it
What constitutes a "job"?
>Customers: Name, address, etc of each customer
You MUST have a unique ID as the primary key of this table.
>Consultants: Name and contact info for each one
Likewise. If the two tables have the same structure, consider using
just one People table with a yes/no field Cousultant to identify which
people are consultants.
>Products: simple list of products
Does each job involve one and only one product? or might it involve
several?
>In jobs, anything (?) can appear several times
>In Customers: company name can appear several times, but surname+name can
>only appear once
I have three friends here in Parma: Fred Brown; his son Fred Brown;
and an unrelated gentleman named Fred Brown.
Name & surname are NOT unique and are not suitable as a unique
identifier.
>In consultants: surname+name can only appear once
>
>So...it's really quite simple. The form is only for adding new people in the
>Customers table, but I will use the same principle for consultants and jobs.
You need at least two additional tables. Since (apparently, though you
don't say) each Job can involve several Customers, and each Customer
can be involved with multiple Jobs, you have a many-to-many
relationship, which needs a "resolver" table with the unique JobID (if
your Jobs table doesn't have one... create one!); similarly for
Consultants. If a Job will NEVER have more than one customer or one
consultant your structure above may be OK.
Assuming that the latter is true, you can use a continuous Form with a
combo box for the customer ID and the consultantID. Since I don't know
how jobs relate to products, I can't advise on that issue, but I
suspect you need a JobProducts table linked to both.
John W. Vinson[MVP]
.
- References:
- Re: How can I add a row from a form?
- From: Keith W
- Re: How can I add a row from a form?
- From: John Vinson
- Re: How can I add a row from a form?
- Prev by Date: Re: COULD SOMONE PLEASE HELP?
- Next by Date: Re: combobox "all" for query criteria
- Previous by thread: Re: How can I add a row from a form?
- Next by thread: Setting up a count to restrict registrations
- Index(es):
Relevant Pages
|