Add a further table to an existing form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When creating a form with the wizard you can base it upon any number of
tables (and hence fields).
If at some later point you then find that you need to "add" another table
into the form, how is this done?
Thanks!
CW
 
CW said:
When creating a form with the wizard you can base it upon any number
of tables (and hence fields).
If at some later point you then find that you need to "add" another
table into the form, how is this done?

There are several ways, but you need to define what you are trying to do:

1. Add a details table, like OrderDetails to an Orders table. A one-to-many
relationship between tables.

To do this, you need to add a subform control and base the subform on a
second table.

2. A second table related to the first with a one-to-one relationship like
an OrderStatus table.

To do this, you need to write a query which includes the 2 tables, then
add the additional fields to textboxes on the form.

3. Values from a foreign key. You store the ProductID in the Orders table,
but you need to see exactly what that item description is.

To do this add and join the tables in a query, then add a textbox to the
form to display the description field.
 
CW, just change the underlying data source from a table to a query, then add
the second table there along with the specific fields you need.

Destin Richter
(e-mail address removed)
 
Thank you, Arvin and Destin, for your advice. I have in fact been using
queries forthis purpose but was wondering if there was some more elegant or
efficient method. Seemingly not!
Is there any downside to this structure - would you say it is better (if so,
for what reason) to gather all the tables when first building the form, or
does it really not make any diference if you have to add a few tables and
fields in later via a query?
Thanks again
CW
 
CW, my main form, qryClients, is built on a query instead of a database. I
don't recall any issues when I first created this, but I may not have enough
experience with this particular design choice to really answer your question.
The bottom line for me, of course, is that it works and does what I need.

Destin
 
Queries are elegant and efficient, especially if written to use proper
indexing. With Access's bound forms, they present the most effective way to
view and edit data.
 
Back
Top