Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code for duplicate prints

Status
Not open for further replies.

nayfeh

Programmer
Mar 13, 2002
163
CA
Hi,

I have a major problem that I need help with.
I have setup a form that generates a report with a command button. The code is below:

********
strSql = "sp_NOPickList " & "'" & strStartDate & "', '" & strEndDate & "'"
*******

This reports calls information from a stored procedure in SQL. There is one main table that the infomation is from (tbl_Headers). I can link this table up to my database if it helps (it's on the SQL server right now). This table has 2 fields, one called "Printed" another called "Duplicate". Both are integer fields.

Here is my problem. I need these 2 fields to get updated when the report is printed. The first time it's printed, the "Printed" field should change from 0 (default) to 1. The next time the report is printed, the Duplicate field should change from 0 (default) to 1. That way I can place a text box on the report called DUPLICATE so that the user will know if the report has already been run.

Is this possible in any way. Your help is very much needed. If you need any further info, please let me know.

Thanks,
TN
 
Hallo,

Could you put some code to check and update your fields in the OnPrint Event of the report?
I've not tried it, but it might work.
Or what about doing your printing from a button and puttin the code in there?

- Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top