Results 1 to 4 of 4
  1. #1
    Russell is offline Novice
    Windows 10 Office 365
    Join Date
    Jan 2023
    Posts
    7

    TextBox or Label not showing in Report until mouse "click"

    I have a report that is working fine when viewed alone, but want it to appear in a navigation pane.
    When it viewed via Navigation pane the header textbox (and have tried using a label instead) - value set by VBA - do not appear until the mouse is clicked.
    Textbox then appears correctly.

    Initially had code grabbing the values dynamically (DLookup), but tried TempVars in case it was related to load order and accessing data.
    (Again... report works fine when viewed directly)

    Code for textbox value:



    Me.txtFireDutyReportTitle = "Fire Duty List : " & TempVars!TempUserDistrictName & " District - " & TempVars!TempUserPlatoonName & " Platoon"

    Either I'm missing something, or at least as a workaround with some code to "simulate" the mouseclick as part of the report load.

    Thanks, Russell

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    Just so you don't confuse others, you mean you want your report to load in a navigation form, not navigation pane, yes? The nav pane is the pane on the left side that shows all the db objects. All I can think of is the cause for this when using forms - the textboxes had multiple lines/rows in it, such as
    dog
    cat
    bird
    That can do weird things with the data display. Maybe check yours for multiple lines with a few records. It might differ between records.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Russell is offline Novice
    Windows 10 Office 365
    Join Date
    Jan 2023
    Posts
    7
    Quote Originally Posted by Micron View Post
    Just so you don't confuse others, you mean you want your report to load in a navigation form, not navigation pane, yes? The nav pane is the pane on the left side that shows all the db objects. All I can think of is the cause for this when using forms - the textboxes had multiple lines/rows in it, such as
    dog
    cat
    bird
    That can do weird things with the data display. Maybe check yours for multiple lines with a few records. It might differ between records.

    FYI - Yes, loading into the Nav main field, below the tabs..... good news is just solved it!

    SOLUTION
    Defining the textbox value in the VBA worked fine viewing report directly - textbox only failed when loaded by and viewed with NavForm.

    I transferred my code from the VBA Code Builder to the actual textbox - and report now loads correctly in the Navigation Window.
    Copying the VBA line ="[insert code from original post]" into the actual textbox value did the trick.

    Thanks for your help anyway.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    Sound like it was an issue with the path for referencing a control on a nav form. For future reference:
    Code:
    Forms![main navigation form].[NavigationSubform].Form
    frmNavigation is often the default name given to the navigation form by Access, IIRC. In the below example, frmOvertime is the subform control on the nav form, so to refer to a textbox named txtEmpID:
    Code:
    Forms!frmNavigation!frmMain.Form!frmOvertime.Form.txtEmpID
    Should be the same for reports except you'd swap Form! with Report! I guess.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-30-2022, 11:05 PM
  2. Replies: 8
    Last Post: 04-21-2021, 09:44 AM
  3. Add data to a table by "on click" action from a report
    By geotrouvetout67 in forum Programming
    Replies: 30
    Last Post: 08-21-2019, 07:36 AM
  4. Replies: 8
    Last Post: 07-13-2015, 12:51 PM
  5. Replies: 5
    Last Post: 05-28-2015, 03:24 PM

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