Using two tables for one form

S

Sarah

I'm fairly new at Access and can't figure this out: I
have a form I've already created and want to add info from
a second table to the form. I can't open up a field list
for anything but the first table. The only other thing I
can figure out to do is create a subform, which I don't
really want.
 
M

mercy

hi sarah,

I'm assuming that the two tables are related in a unique
way.... So waht I would do is create a query that pulls
the info i want from both tables... and then create a
form with that.

ie: table a: name, sex
table b: name,age
qry X: select a.name, a.sex, b.age from a,b where a.name
= b.name

build a form on X ... and it will pull the right
records ... and also save any new records you create.
 
J

John Vinson

I'm fairly new at Access and can't figure this out: I
have a form I've already created and want to add info from
a second table to the form. I can't open up a field list
for anything but the first table. The only other thing I
can figure out to do is create a subform, which I don't
really want.

How are the two tables related? Does one record on the first table
link to only one record on the second, or to multiple, or is there no
connection between the tables at all?

You can base a Form on a Query joining two (or more) tables, but the
results may not be what you expect. For one to many relationships a
Subform is generally the best option - why are you averse to them?
 
S

sarah

The tables aren't related, but I could and probably should
make them that way, indexed by a unique ID number.

I'm only averse to subforms because I'm not so great at
using them. I'd like to just have the info on one of my
tabbed pages, rather than below, and putting in a subform
didn't seem to do that. To be more clear, I've already
got half the information in the form, and wanted to add to
it. If I link the tables by a query, how do I add that to
the form?
 
B

Bob Barnes

As you learn more Access, you can use an Unbound Form, &
with code, display "2 or more Tables" data.

HTH - Bob
 
M

msmcnewsxp

use the query as the data source.

sarah said:
The tables aren't related, but I could and probably should
make them that way, indexed by a unique ID number.

I'm only averse to subforms because I'm not so great at
using them. I'd like to just have the info on one of my
tabbed pages, rather than below, and putting in a subform
didn't seem to do that. To be more clear, I've already
got half the information in the form, and wanted to add to
it. If I link the tables by a query, how do I add that to
the form?
 
J

John Vinson

The tables aren't related, but I could and probably should
make them that way, indexed by a unique ID number.

I'm only averse to subforms because I'm not so great at
using them. I'd like to just have the info on one of my
tabbed pages, rather than below, and putting in a subform
didn't seem to do that. To be more clear, I've already
got half the information in the form, and wanted to add to
it. If I link the tables by a query, how do I add that to
the form?

I still am not visualizing how you want the data to look.

Suppose you have 318 records in the first table and 1294 records in
the second table. There is no connection between the two tables; if
you select a record in TableA, all 1294 records in TableB will be
equally applicable.

What do you want to see on the screen? A single record in TableA and a
continuous form with 1294 records on the same screen? An arbitrary
record from TableB? Some particular record from TableB?

I fear you're designing this database wrong end first. Forms ARE JUST
WINDOWS onto the data; the Tables are the foundation! If you're
building a house, you pour the foundation footers first; assembling
the windows can come later.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top