Changing Printed Layout From Record To Record

RodShinall

Registered User.
Local time
Today, 02:11
Joined
Dec 21, 2006
Messages
32
I am creating an application that prints label inserts for CD jewel cases. I have several different text layout styles that I use. For example, Style A, Style B, Style C, etc. Each style differs from others in its text box placement and graphical elements such as dividing lines. In my table I included a "TextLayout" field which is bound to a combo box on my data entry form. When I create a new label insert(record) I assign it a particular style using this combo box. When I navigate from one record to the next I wanted the form to display the correct layout according to which style is selected in the Text Layout Combo Box. In other words if record 1 is Style A and I go to record 2 which is style B I wanted the form to change the position of text boxes and lines to reflect the way it looks when printed. By using the On Current form event with an If..ElseIf structure I accomplished this exactly as I wanted. My problem is that I have not figured out how to do the same thing when printing multiple label inserts with varying styles. Only one label insert (database record) prints per page. I have created separate reports for each style, but this requires printing only one style at a time. I want to be able to select and print multiple records with different layout styles and have the report layout change from record to record (page to page) based on the contents of the Text Layout Combo Box on my form. I use a check box on my form to mark records to print. When my report opens it grabs only those records that are checked. It has been suggested that I stick with one report for each style and loop through the records in some manner to print them, but I haven't got a clue on how to do this and don't want to do it this way anyway. I want to use only one report and have the VBA code change the layout (adjust the Left and Top properties of text boxes, hide or show lines, etc.) from record to record (page to page) as they print. I realize that this may not be the most efficient way to approach this because I will have to update my code every time I add a new text layout style, but I don't mind. Is this possible or am I dreaming? Any help would be greatly appreciated.
 
It's possible but it's really alot of work... it seems like an overkill to me. I would loop through the the checkboxes and print the appropriate report for each record myself.
 

Users who are viewing this thread

Back
Top Bottom