Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP WITH MACRO DESING TO PRINT LABELS USING RECORD ID# 1

Status
Not open for further replies.

villica

Programmer
Feb 25, 2000
332
CA
Sorry everyone. I posted this question before.<br>&nbsp;<br>I have a form that ask the user to print certain records so I created a (from<br>Record field) and a (to Record # field) on the form so that the user can enter<br>the data. Can anyone help me or sugeest how to create a macro that will<br>meet the above requirement. The data will come from only one table. Within<br>the table I have a record id. I am trying to print labels. <p>Villica<br><a href=mailto:villica67@hotmail.com>villica67@hotmail.com</a><br><a href= > </a><br>
 
Villica<br>I'm not sure of the design of your form, but here is a procedure that I have used to print a report based on the current record shown in the form. I haven't tried it with a mailing label, but since a mailing label is a type of report I assume it will work.<br><br>Create a macro that opens a report (mailing label). This macro uses the OpenReport action. Set a Where Condition argument to make the report display the same record currently displayed in the form.<br><br>For example, assume the form is called &quot;frmDonations&quot; and it has a number of fields, including FirstName, LastName, Address, et. It also has a RecordID field, and each entry in that field is unique. I assume this form would be based on a table which holds the records.<br><br>The macro would look like this...<br>ACTION: OpenReport<br>ARGUMENTS: REPORT NAME: rptMailingLabelsForDonations (or whatever yours is called)<br>VIEW: Print<br>WHERE CONDITION: [field name]=[Forms]![form name]![form control name]<br><br>Using the example above, this WHERE CONDITION would be...<br>[RecordID]=[Forms]![frmDonations]![RecordID]<br><br>You can then attach this macro to the On Click property of a command button, that prints the current record when you press the button after saving that record (shift-enter) but with that record still in focus.<br><br>Hope this helps.<br>Tom
 
Thank you for your help.it works <p>Villica<br><a href=mailto:villica67@hotmail.com>villica67@hotmail.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top