Printing Reports from Subforms..

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

Guest

Hello all... I have an Access 2003 form which contains the following items...

Main form contains a combo box which selects the specific project data
Sub-form which contains all of the data for a particular aspect of the
chosen project.
Both of these Forms are linked together and help to build and process the
report which i need to preview and print. I have tried the built-in wizzards
for creating a print button and when i do this i only get the first project,
when i might actually be on the 45th project. I am thinking that i need to
create some code which specifies that i want the current project and not the
first. Any suggestions and all help is appreciated..

Many thanks....
 
Allen, i understand what your saying however i am a little confused by the
Primary Key? What does this refer too, I assume you mean the Primary Index
number for this particular record, am I correct?
 
Yes, if you have an AutoNumber, that would probably be marked as the primary
key in the table that your form draws its records from.

The primary key doesn't have to be an autonumber. If you open the Northwind
sample database, the Order Details table has a 2-field primary key. What's
important is just that every table has some kind of primary key that
uniquely identifies the record. You can then use that to uniquely identify
the record you want for your report.
 
Northwind is on the Office CD. If you do a standard install, it should
already be on your hard disk.

If you did a custom install, you should be able to open the Control Panel in
Windows, go to "Add/Remove Programs", and "Change" the MS Office install to
add this component.
 
Back
Top