Print label upon update of record. (1 Viewer)

DBrodin

Registered User.
Local time
Today, 14:18
Joined
Mar 5, 2011
Messages
21
I am considering adding a feature to an existing database. I would like to print a label (in this case a name tag) automatically when a field in a record gets updated (the person is flagged present). Is this doable?

Thanks,

Dale
 

DBrodin

Registered User.
Local time
Today, 14:18
Joined
Mar 5, 2011
Messages
21
Sure, you can use OpenReport to print the label and this method to filter it:

http://www.baldyweb.com/wherecondition.htm

That gave me the hints to go in the right direction with this. I was mentally stuck on printing the contents of the form directly. Making a report based on the form, then printing the report turned out to be relatively easy. This is my code.

Private Sub Present_AfterUpdate()

If Me.Present.Value = "-1" Then
DoCmd.OpenReport ("Name Tag")
End If
End Sub
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 12:18
Joined
Aug 30, 2003
Messages
36,126
Glad it helped.
 

Users who are viewing this thread

Top Bottom