how can i print selected record in form view

  • Thread starter Thread starter jfp
  • Start date Start date
J

jfp

I have a form with data source a table. The form shows one record at a
time. On the form, i would like to add a button that will print the
single selected record as it appears in form view. What code should i
use for this?
The default toolbar that is available has a "print" button -- that dumps
the entire table to the printer, which is an absolute disaster since
each record is shown in form view, one immediately following the
previous, running over page breaks.
If i use Ctrl-P (or File / Print), the default is (as above) to print
all pages. There is, however, an option to print "Selected Record(s)".
This does what i want. How do i programmatically accomplish this ?

Thanks !
 
jfp said:
I have a form with data source a table. The form shows one record at a
time. On the form, i would like to add a button that will print the
single selected record as it appears in form view. What code should i
use for this?
The default toolbar that is available has a "print" button -- that dumps
the entire table to the printer, which is an absolute disaster since
each record is shown in form view, one immediately following the
previous, running over page breaks.
If i use Ctrl-P (or File / Print), the default is (as above) to print
all pages. There is, however, an option to print "Selected Record(s)".
This does what i want. How do i programmatically accomplish this ?

Add a command button to your form. The button wizard should
generate the code for you. You may need to modify the code
a little and if you have trouble doing that, post back with
the code you have so far.

Another way is to base the report on a query that uses the
form's primary key text box as the criteria to select the
desired record.
 
Back
Top