How to print label after data insertion (1 Viewer)

dzirkelb

Registered User.
Local time
Today, 13:13
Joined
Jan 14, 2005
Messages
180
Using a data macro, I want to know how to print a report after the insertion of a row of data. I am able to create the macro, but there are no choices for reports on the actions.

Also, I see an action for a DataMacro, however, when I create any macro, they do not show up in the list of available macros to choose.

I'm using Microsoft Access 2016
 

Ranman256

Well-known member
Local time
Today, 14:13
Joined
Apr 9, 2015
Messages
4,337
In a form that shows the records. Select the new record, click print...
Docmd.openreport "rLabel", acPreview,"[id]=" & txtID

But if its an entire list of records, then you don't need the form.
 

dzirkelb

Registered User.
Local time
Today, 13:13
Joined
Jan 14, 2005
Messages
180
I know how to print a report from a form and from visual basic; however, I dont' see how I can do that from an After Insert event from Access Table.

I open the table, click on the table tab, click After Insert.

On the list of available actions that appear, none of them, that I can tell, allow me to put in any code or print a report.
 

dzirkelb

Registered User.
Local time
Today, 13:13
Joined
Jan 14, 2005
Messages
180
Can anyone help with this? I want to insert a row into a table, then automatically print a report.

Right now, I'm just trying to test the trigger. I know the trigger is happening as I tested with the SendEmail event, and it works fine.

I just can not figure out how to print a report from this trigger. There is no option to print report, or even run vba code.
 

dzirkelb

Registered User.
Local time
Today, 13:13
Joined
Jan 14, 2005
Messages
180
Ok, so I just figured out how to get the label to print, easy enough so far.

I put a new row in my test table, label prints, all good.

I push a new row of data into that table via web app, nothing prints.

Is this a limitation where you have to have the table open and do the insert yourself?
 

Users who are viewing this thread

Top Bottom