views:

30

answers:

1

I'm really brand new to all this, so excuse me if it's a stupid question. I've got two list boxes on an MS Access form. I'm resizing the list boxes based on how much data I'm getting back. However, this form needs to print, and the list boxes have enough data in them that they need to stack one above the other. When the first list box expands, it covers the second list box. How can I move the second list box down, so that you can clearly see it?

+2  A: 

A really good tip here is to avoid trying to print a form, and use a report. Forms are for data entry, and reports are for printing data.

You don't need any code to get the controls to expand and contract as needed. Just place the listboxes on the report, and set their can grow and can shrink to true. And, in fact, better than listboxes would be to use two sub-reports. The sub-reports will allow multi columns of data, allow formatting of each column, and again the can grow and can settings as true will allow them both to expand and contract as needed.

So, you don't need to write a bunch of code, but it is strongly suggested you use a report and not a form for printing as there many options setup that allows controls to expand and contract as so often needed when printing data. So, listboxes on a report with can grow likey can work, but sub-reports will likey work even better and they allow formatting of the data.

Albert D. Kallal
Thanks. The reason for printing the form was that it already existed, is interactive, and has all the data that the invoice needs.
yossarian
Reports are for printing, forms are for viewing/editing data. Failing to conform to that distinction leads to problems, as you well know.
David-W-Fenton