Yes, I want to know how to write the code about setting the report width and
setting the text box left properties.
The simple illustration of my report problem is like this :
- Design mode
Report width : 1 inch, widest possible : 7 inch
There are 7 text box (all text box left: 0, width : 1 inch)
In preview mode, if user want to display 3 columns :
- text box 1 left 0
- text box 2 left 1 inch
- text box 3 left 2 inch
- text box 4 until text box 7 visible=false
So the report only needs width 3 inch and user can set margin left to 2.5
inch to make the report preview seemed center (paper size 8.5 inch x 11
inch).
I have tried to write simple code like this :
Private Sub Report_Open(Cancel As Integer)
'using twips
me.width = 4320
End Sub
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
me.txtField1.left=0
me.txtField2.left=1440
me.txtField3.left=2880
End Sub
After I preview the report, txtField2 and txtField3 are not seen.
I also try to write the code like this and the problem is same (txtField2
and txtField3 are not seen)
Private Sub Report_Open(Cancel As Integer)
'using twips
me.width = 4320
me.txtField1.left=0
me.txtField2.left=1440
me.txtField3.left=2880
End Sub
Thanks.