Printing Subform Info Using a Command Button

O

opaitguy

I have a form with an integrated subform. The subform returns values (via
pre-defined fields) based on user-defined search criteria (from a search
button created on the form). I need to know if there's a way to search the
database via the search criteria, populate the subform with the return values
and print those values in a report. I have managed to get the subform
populated and have created the report. Creating a PRINT button will print
out the entire database. Creating a PRINT FORM button also prints out the
entire database (and the form). I just want to search the database, return
the results via the form and create a print button that prints out only the
results in an existing report. Any help will be much appreciated. Thanks in
advance!
 
J

Jae

One of the way to accomplish that is thru the use of temporary table. Once
you get the recordset of the seach result, make a temporary table w/ that
recordset. Then you could print the report which has a record source as the
temp table.
 
O

opaitguy

That's a good idea. Being that I am a Access novice, how do you go about
returning the values into a temporary table? This seems to be a very
involved way of doing it (although I understand what you're getting at). Is
there an easier way? I was simply looking for creating a 'Print' button that
will print out the report using the result data that populates the subform
once the search completes.
 
J

Jae

I need to know how you are getting the search result. Are you using one of
the field in parent form to filter out the result in your subform? Or are you
passing sql string to subform's record source?
 

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