Re: How can I add a row from a form?



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]
.



Relevant Pages

  • Re: Part Numbering Systems for CAD management.
    ... Currently we have about 60 different customer folders ... seperate assemblies from parts. ... machining and fabricating prototypes. ... if you're doing 250 jobs per year and you can't pay off your 2 ...
    (comp.cad.solidworks)
  • Re: Need help export data
    ... Jeanette Cunningham -- Melbourne Victoria Australia ... database, will my frontend connect seamlessly to their .be database such ... Adding extra customer service reps to the table for customer service reps ... to the jobs table in the copy I made of the database. ...
    (microsoft.public.access.externaldata)
  • Re: Need help export data
    ... If I re-create the new fields on their backend .be ... database, will my frontend connect seamlessly to their .be database such that ... Adding extra customer service reps to the table for customer service reps is ... to the jobs table in the copy I made of the database. ...
    (microsoft.public.access.externaldata)
  • Re: Need help export data
    ... Adding extra customer service reps to the table for customer service reps is ... Jeanette Cunningham -- Melbourne Victoria Australia ... Both tables are in the same Access database. ... to the jobs table in the copy I made of the database. ...
    (microsoft.public.access.externaldata)
  • Re: sqlite3 & joins
    ... requires specific parts which can be used in other jobs. ... a customer table with unique records for each customer, ... and then when I'm more familiar wit SQLite look at optimizations like ... Jobs has a field for the customer number in it and a unique field ...
    (comp.lang.ruby)