Hi,
1) I have report, based on query.
2) This report is filtered with between dates criteria and combo-box selection.
This means reports brings very specific record every time
3) report has print button to print that record.
Now I want to this record as printed in the table. I have a field in table named "Printed" (yes/no). If the document is printed then yes (True) otherwise no (False).
1st Method = Report close event
I tried to make Report close event property, with confirmation message "have you printed the report" vb yes/no. still this does not work.
I have following code on report close event.
I get the error as in picture " you can assign value to object"
2nd Method = Form Unload event
I tried to bring this report on Form, on form unload property used the same code, I got the same error.
3rd Method = on form itself marked "Printed=Yes"
I brought the Query Field "Printed" on the form, once the report printing was finished. I marked this field (Printed = Yes) tick marked. Then I looked into table,
Only the 1st record of report was marked as printed int the but not other.
Meaning not all records which were on report, were not marked as printed (Yes).
Problem not solved..........Can someone help me. Thanks
1) I have report, based on query.
2) This report is filtered with between dates criteria and combo-box selection.
This means reports brings very specific record every time
3) report has print button to print that record.
Now I want to this record as printed in the table. I have a field in table named "Printed" (yes/no). If the document is printed then yes (True) otherwise no (False).
1st Method = Report close event
I tried to make Report close event property, with confirmation message "have you printed the report" vb yes/no. still this does not work.
I have following code on report close event.
Code:
Private Sub Form_Unload(Cancel As Integer)
Dim Msg, Style, Title, Help, ctext, Response, Mystring
Msg = "Have you printed your report??" '' Define message
Style = vbYesNo + vbQuestion + vbDefaultButton1 ''Define Style
Title = "Printing"
Help = "DEMO.Hlp"
ctext = 1000
' context.
' Display Message
Response = MsgBox(Msg, Style, Title, Help, ctext)
If Response = vbYes Then
Me.ChkboxPrinted = True
Else
Me.ChkboxPrinted = False
End If
End Sub
I get the error as in picture " you can assign value to object"
2nd Method = Form Unload event
I tried to bring this report on Form, on form unload property used the same code, I got the same error.
3rd Method = on form itself marked "Printed=Yes"
I brought the Query Field "Printed" on the form, once the report printing was finished. I marked this field (Printed = Yes) tick marked. Then I looked into table,
Only the 1st record of report was marked as printed int the but not other.
Meaning not all records which were on report, were not marked as printed (Yes).
Problem not solved..........Can someone help me. Thanks
Attachments
Last edited: