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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Marking a record as printed

Status
Not open for further replies.

ddevil

Technical User
Feb 14, 2006
49
US
Can anyone tell me what would be the best way to mark that a record has been printed. This would be just a reminder to the user to print the record if they didn't. So, when they go to enter another record or exit the form and they didn't print the current record, then I want to prompt them to remember to do that.

Any ideas would be very helpful. Thank you!
 
How are you printing the record? Why not add some code to that procedure to update a flag in your table?
 
The record is being printed from the form, through a button. How would you flag that. Would you just check for the click event on the button?
 
You will need to add a Yes/No field to your table. It would be a good idea to show this field on your form as well, as a reminder for your users. You can lock it, so it only gets updated through code. You can then add a little code to the print button to update this field/control.
 
Do I have to add a field to the table? Can it just be a field on the form that gets updated based on the print button being clicked? I don't necessarily want to store this information, it's just a reminder to the user if they fogot to print. So would it be something like this:

Private Sub PrintAPReport_Click()

Would the code go here? Would it be?

Printed = -1 ( This is a check box)



DoCmd.OpenReport "PaymentRequestReport", acViewPreview, , "ChildWRNumber = " & ChildWRNumber
End Sub
 
Setting an unbound control for any record will set it for all records, so if you:

Me.chkPrint = True

On the first record, you will have to:

Me.chkPrint = False

In On Current.
 
I'm sorry I'm just not getting this. If I put the me.CheckPrint = True in (like below) I get an error that says. Runtime error 438, object doesn't support this property or method.

Private Sub PrintAPReport_Click()

DoCmd.OpenReport "PaymentRequestReport", acViewPreview, , "ChildWRNumber = " & ChildWRNumber

Me.CheckPrint = True

End Sub

I'm setting the variable to False if they close the form.

Private Sub ClosePayToCust_Click()
On Error GoTo Err_ClosePayToCust_Click

Me.CheckPrint = False

DoCmd.Close

Exit_ClosePayToCust_Click:
Exit Sub

Err_ClosePayToCust_Click:
MsgBox Err.Description
Resume Exit_ClosePayToCust_Click


I'm setting the variable to False if they enter a new record.

Private Sub GetInformationBtn_Enter()

DoCmd.OpenForm "CriteriaFormCustomer"
Printed = 0

Me.CheckPrint = False

End Sub

 
Are you sure you have the name of the checkbox?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top