Two Tables and one Form - Newbie Question

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hello,

How would I base a form on two or more tables, and how
can I have two forms for the same table?

Thanks
 
Daniel said:
Hello,

How would I base a form on two or more tables, and how
can I have two forms for the same table?

Thanks
Hi,
Several ways:
If the tables relate to each other one to one - use a query, and have the
form based on the query.
If the tables relate to each other one to many - have the main form as the
table on the one side of the relationship, and a subform of the many side of
the relationship.

You can have as many forms as you like for a table or any combination of
tables / queries. If just depends on what the need for the form is.

Now, if this does not answer your question, please send a clearer question.
HTH
Marc
 
Daniel,
Simple. Before you put the fields in the form, create a
Select Query using the two tables, pulling the info fields
from the tables into the query grid. Be sure to pull the
Foreign Key field (it will be a Primary Key in one table,
and the field in the other table that relates it) from the
RELATED table into the query first. Then whatever other
fields you need in the order you'll use them. Then, you
create the form using the Query as the source, rather than
trying to use two tables (which doesn't work). You can
have as many forms as necessary from any table, depending
on their usage. Often, you'll have one that is an entry
form, entering the basic data; then, you may have one that
puts in related info, but you want to show the original
info, such as, say, Company Name, address, phone, etc.
Then you create the query as above, using Company Name
from the second table as the first field in the query
(since it's a Select Query, it Selects the related data
from the related table where the Company Name is the
primary key).
Bernie
 
Back
Top