I have a report that is often being modified by management. Adding/deleting columns and total levels plays havoc with alignment. I want the report to self arrange all the columns.

The left position of column 2 should start at column1.left + column1.width; column3 should start at column2.left+column2.width and so on.

I created a little bit of code to test this and I am stuck on this error:
"the setting you entered isn't valid for this property"

The code appears below. As you can see I can successfully query the properties of the controls and I can even set the .visible property. But I cannot set the .left property.

In this example the controls are labels in the heading area. But I want to do the same to text boxes in the detail area.

Any ideas?
Thanks,
Jim

Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As Integer)

dim intA as integer
With Me
' use intA to test querying these values
intA = !lblOpenOrderAmount.Left
intA = !lblOpenOrderAmount.Width
intA = !lblOpenOrderCount.Left
intA = !lblOpenOrderAmount.Left + !lblOpenOrderAmount.Width
' so far, so good
' test to see if the .visible setting can be changed without error
!lblOpenOrderCount.Visible = false
!lblOpenOrderCount.Visible = True

'error occurs on the following line, no matter what I put to the right of the =
!lblOpenOrderCount.Left = 1 ' (!lblOpenOrderAmount.Left + !lblOpenOrderAmount.Width)

end with

end sub