disable button for a particular record (1 Viewer)

deepbreath

Registered User.
Local time
Today, 19:29
Joined
Apr 18, 2001
Messages
73
i have a print button which prints a record. i want to disable it after the record is printed once. so that when user see the record again he know he cannot print it again, because it has been printed already. but the button should be enabled for the other not printed records.
thanks
 

Carol

Registered User.
Local time
Today, 19:29
Joined
Jan 15, 2000
Messages
280
What happens if the record is lost or destroyed or requires an additional copy.

I would set up an additional field in my form
to hold a checkbox, that when the report is printed would update the checkbox to true to show that it has been printed.
 

deepbreath

Registered User.
Local time
Today, 19:29
Joined
Apr 18, 2001
Messages
73
can u help me with that, i have an idea, if we want to print it again, can we add "duplicate" on the report. help me with the steps
thanks
 
R

Rich

Guest
Another way is to store the actual date the report was printed, when you then reprint you can show duplicate originally printed etc.
 

Carol

Registered User.
Local time
Today, 19:29
Joined
Jan 15, 2000
Messages
280
1 - In your table, create a Yes/No field and call it Printed
2 - In your form, on the Print Button, put the following code as an Event Procedure in the On Enter:

Private Sub Print_Enter()
On Error GoTo Print_Enter_Err

Forms!MyFormName!Printed = True


Print_Enter_Exit:
Exit Sub

Print_Enter_Err:
MsgBox Error$
Resume Print_Enter_Exit

End Sub

3 - On your report, bring the field Printed onto your report and have its Visible set to No

4 - Create an additional text field and get rid of the label. In the control source for your text field, put
="DUPLICATE"

5 - Set its Visible Property to No

6 - In the On Format on where your controls are placed, put this code in an Event Procedure:

If Me.Printed = -1 Then
Me.Text163.Visible = True

Else
Me.Text163.Visible = False
End If

Change Text163 to represent the name of your Duplicate Text Box

Good Luck.
 

Users who are viewing this thread

Top Bottom