New to Access (help)

  • Thread starter Thread starter Lhei
  • Start date Start date
L

Lhei

HI! i have two tables. the second table has the first
table's primary key as a foreign key. i want my report
(by using a query) to display certain fields from both
tables. the relationship is one-to-one (only one record
for each printed report). How can i do this?
 
-----Original Message-----
HI! i have two tables. the second table has the first
table's primary key as a foreign key. i want my report
(by using a query) to display certain fields from both
tables. the relationship is one-to-one (only one record
for each printed report). How can i do this?
.

Reply You need to or should set up a relationship between
the tables. Use Relationship from Edit Menu. Once this is
done create a query using New / Design view. Select both
tables and their should now be a line joining the tables
since you set up the formal relationship in the previous
move. Select fields from either table by double clicking
on the field names in the table window ( upper pane)
Click the ! point to run the query to see if that is what
you want. If not just return to design view and correct.
Next base your report on this new query by selecting New
auto report tabular from the Report Object window. Voila.
 
HI! i have two tables. the second table has the first
table's primary key as a foreign key. i want my report
(by using a query) to display certain fields from both
tables. the relationship is one-to-one (only one record
for each printed report). How can i do this?

Don't confuse data STORAGE with data PRESENTATION. One record for each
printed report has absolutely *nothing* to do with whether tables are
related one to one, or one to many - you can get one page per record
either way, or many records per page either way!

I'd suggest that you take this stepwise: first create a Query joining
the two tables, linking the first table's PK to the second table's
foreign key.

Then create a Report based on this Query, and use the Report's
"Sorting and Grouping" dialog to force a new page on each record
(whether that's each main-table record or each related-table record is
entirely up to you). The Report Wizard will help you set this up.
 
Back
Top