Connecting Tech Pros Worldwide Help | Site Map

Urgent HELP: MoveLayout doesn't work

Newbie
 
Join Date: May 2007
Posts: 1
#1: May 4 '07
I have been working with Access for years.
I have written routines that reposition controls and subreports by using MoveLayout

Now I'm using Windows XP, Office 2003 and Access 2003.
Also I have installed Access97

Creating a new MDB with just a report with some header-text and, and in the Detail section a Textbox called 'Textbox1' with a control Source: ="Empty value",
I try to move this control down when formatting or printing the Report.
For this I use following code.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  2.    Debug.Print Me.Textbox1.Top
  3.    While Me.Textbox1.Top < 2000
  4.       PrintSection = False
  5.       NextRecord = False
  6.       MoveLayout = True
  7.    Debug.Print Me.Textbox1.Top
  8.    Wend
  9. End Sub
As I have used some similar before, this should work.
But it doesn't. The Textbox1.Top is 120 and stays 120.

Does anybody know what may be wrong here?
puppydogbuddy's Avatar
Expert
 
Join Date: May 2007
Location: Florida
Posts: 1,915
#2: May 7 '07

re: Urgent HELP: MoveLayout doesn't work


If your code is intended to avoid orphraned group headers, see this link:

http://www.groupacg.com/ARptTip.htm#COLHEAD
Reply