Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513

    re-positioning a control at run time

    this is about a SUBreport

    Depending on whether or not a bit of info is also included in the subreport, I want a control to be placed at one position or another.
    Consequently, I added this code:
    Code:
    Private Sub Report_Load()    varInclJobNo = DLookup("[InclJobNo]", "tbeFixtureSchedulePrintOptions")
    
        If varInclJobNo Then
            Me.lblftrDate.Top = 0.5382 * 1440 '1 inch = 1440 twips
        Else
            Me.lblftrDate.Top = 0.3785 * 1440
        End If
    End Sub
    If I just check the code by opening the subreport alone, it "seems" to work;
    but when it is opened as a child of the main report... no

    ... I thought that maybe it wasn't unloading (when the parent report was closed... so the child subreport never actually reloaded (?)).
    So I added this:


    Code:
    Private Sub Report_Unload(Cancel As Integer)
        DoCmd.Close acForm, Me.Child_footer.Name
    End Sub
    but that didn't work, either
    Then i tried another half dozen or so other things...

    At this point, i'm fishing in the dark; and any suggestion would be greatly appreciated in advance,
    mark

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    you have to reference the subform from the mainform, you can't use the ME keyword.

    Reports![main report name]![subreport control name].Report![controlname]

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Positioning subforms
    By msmithtlh in forum Forms
    Replies: 16
    Last Post: 06-19-2014, 11:54 AM
  2. Positioning the mouse pointer
    By Larry in forum Programming
    Replies: 1
    Last Post: 07-25-2013, 01:10 PM
  3. Sizing and positioning
    By 161 in forum Database Design
    Replies: 1
    Last Post: 04-09-2011, 10:52 AM
  4. form positioning
    By taylorosso in forum Forms
    Replies: 5
    Last Post: 08-23-2009, 08:00 AM
  5. Positioning Tabular Labels
    By rod147 in forum Forms
    Replies: 6
    Last Post: 07-06-2009, 11:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums