I have a report in which I want to print one group of controls on a certain true condition, and another group of controls if the condition is false.

Each group of controls is located in the details section of the report, both print well in development when the conditions are not tested.

I want to change the placement of the controls via procedures being called, but when I attempt to use the .left and .top properties I receive an error message:
"runtime error 2101
"The setting you entered isn't valid for this property"

The general code I am using is:

If A then
call procedure 1
call procedure 2
end if

where procedure 1 may have:

const leftmarg = 1200 'in twips
const top1 = 50

with me.control1
.visible = true
.top = top1
.left = leftmarg
end with

the error message comes at the .top point

I have looked at the use of cangrow/canshrink etc to eliminate whitespace and feel it is not appropriate for what I am attempting to do.

I have also looked at printlayout, movelayout, onretreat onprint to try and work this out.

any help would be appreciated.