Results 1 to 3 of 3
  1. #1
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149

    print global valuable in report


    i set a company name in a global valuable gblCompName.
    how to print gblCompName in a report?

    I open the report in preview.
    how to show the print button to print to printer?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    Presume you meant 'global variable'.

    Build a custom VBA function that returns the global variable.

    Function GetCompName
    GetCompName = gblCompName
    End Function

    Call that function from a textbox: =GetCompName()

    Alternatives to global variable are: 1) TempVars and 2) reference textbox on a from that has the company name.

    Buttons are not available on report in Preview. Use ribbon Print or button on form to send directly to printer or right click menu.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149
    Thanks June7

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

Similar Threads

  1. Passing Global Constants to controls on a report
    By Carbontrader in forum Reports
    Replies: 1
    Last Post: 05-10-2017, 12:17 PM
  2. Replies: 3
    Last Post: 04-28-2017, 09:51 AM
  3. Replies: 5
    Last Post: 08-06-2015, 03:26 PM
  4. Replies: 1
    Last Post: 02-21-2015, 11:35 PM
  5. Replies: 6
    Last Post: 03-01-2014, 07:07 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