I am trying to print labels out. I went to the label wizard and created the label, but my problem is that it returns all of the records in the table. I want it to print one label per ID from that table. What is the proper VBA coding to use?
I am trying to print labels out. I went to the label wizard and created the label, but my problem is that it returns all of the records in the table. I want it to print one label per ID from that table. What is the proper VBA coding to use?
Try this:
DoCmd.OpenReport "MyLabelReport", , , "MyTableIDField = " & Forms!MyFormName!MyRecordIDControlName
I'm not quite sure I understand this..
What do the , , , do? And the label is pulling the information right from the table, not a form..does that matter?
Do you want to print labels for every record in your table, or do you want to print one label for a particular record of your table?
My table consists of active and inactive clients where I have their SSN in there and I only want to print one label per active SSN. One client may have more than one account.
Create a query that retrieves just the records you need. Use that query as the recordsource for your label report.