General information
Category:
Forms & Form designer
Title:
Using CmdButton to Print/Preview Report
I have designed in intake form which uses a field called "Names.name_id" as the primary field Names table to like all other tables in the database. On my form I have a command button fror printing (and one for previewing) a report which basically prints out all the information on the intake form. The problem I'm having is this: sometimes it works fine (depending on which page of the form you are on, but sometimes the "Print Report" CmdButton will cause a report to print for every record in the database rather than just the record that is being displayed on the screen (which is the only record that should be printed). Also the "Preview Report" CmdButton displays the correct report but if you hit the printer icon with report displayed it prints reports for all records.
The "Print Report" button has the following code in the click event: PreRepID = Names.name_id
Report Form Intake.frx For Names.name_id = PreRepID To Printer
The "Preview Report" click event is similar:
PreRepID = Names.name_id
Report Form Intake.frx For Names.name_id = PreRepID Preview
Any suggestions?
TIA
--Lincoln
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only