January 2002
Beginner
576 pages
13h 23m
English
There might be times when you need to print copies of a particular record on your form. The following code attached to the OnClick event of a command button on a form performs the task:
RunCommand acCmdSelectRecord DoCmd.PrintOut acSelection, , , , 3
This function uses the RunCommand method with the intrinsic constant acCmdSelectRecord to carry out the Select Record command from the Edit menu on the menu bar, which selects the current record. Then, the PrintOut method of the DoCmd object, having the PrintRange argument set to acSelection, prints the selected record. The fifth argument in the PrintOut method instructs the printer to print three copies. You also can use the PrintOut method to print page ranges. Because you ...
Read now
Unlock full access