Shall I write a macro for this?

deadfish

Registered User.
Local time
Today, 21:29
Joined
Apr 8, 2004
Messages
10
Hi,

I have to write ...I think it's a trigger...

I have a table, TABLE_A, I need to print all the records (an access report, to printer) in TABLE_A whenever the FIELD_1 of the new inserted record = "PRINT" (the user keep on inputting record, I have to print out the report whenever it triggers the "PRINT" value). Shall I do this by writing macro and then run the marco throughout the time the user accessing the database? Or I can do that in an easier way?? How should my code look like??

Thanks in advance!
 
Thanks Tony! But let me explain my problem clearly:

I have a table with the following structure:

Loc varchar(5),
Item_no varchar(16),
Qty decimal.

The user keep on inputting records like this:

Loc Item_No Qty
-------------------
Loc1 Item1 1
Loc1 Item2 2
Loc1 Item3 3
Loc1 Item4 4
Loc1 PRINT 1
Loc2 Item1 2
Loc2 Item2 4
Loc2 PRINT 1
Loc3.......
.....


At the time the user inputting the record "Loc1 PRINT 1", the printer should print out the report containing all items of Loc1 (without clicking on any button, print out automatically), the user can still input other records at the same time. Similarly, when user input "Loc2 PRINT 1", the printer should print out the report containing all items of Loc2 also and keep on inputting records for Loc3...

Is it possible to do in Access??

Thanks in advance!
 
I assume users are entering data via a form in which case just use the AfterUpdate event to check if the the item contains the word Print, then use VBA to save and print the record, post back if you want further help
 

Users who are viewing this thread

Back
Top Bottom