Results 1 to 2 of 2
  1. #1
    Carbontrader is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    12

    Passing Global Constants to controls on a report

    Background: I manage the commercials of a large engineering project from an Access database. I run a significant number of resource cost and budget reports regularly over the course of the fiscal year. At the end of the year, the database is archived, and I create a new database. In the new database the reports need to be revised to include the new year's parameters: viz Fiscal Year, number of weeks in each fiscal month, etc. So far I have been manually editing the reports, but this is tedious due to the number of reports and the number of calculated controls on each report.



    Question: what is the best way to pass fixed data such as Fiscal Year, Fiscal Month Start and End dates, etc. to a control on a report so that I don't need to edit so many different controls? I tried using Global Constants, but this only works if I create a dummy control that gets assigned its value via the report's On Open event VBA routine, then reference the dummy control in a control's formula elsewhere on the report. There must be a better way!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    This link shows code that works in a Report's Open Event as well. http://www.baldyweb.com/OpenArgs.htm

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

Similar Threads

  1. Passing global variables question
    By newbieX in forum Programming
    Replies: 6
    Last Post: 10-03-2014, 02:09 PM
  2. Replies: 7
    Last Post: 07-22-2014, 08:29 AM
  3. Create a form with variables and constants
    By smcnair_wtc in forum Forms
    Replies: 2
    Last Post: 01-08-2013, 10:54 PM
  4. data type variable constants
    By markjkubicki in forum Programming
    Replies: 2
    Last Post: 06-20-2012, 09:57 PM
  5. Passing parameters to a report
    By elmousa68 in forum Access
    Replies: 0
    Last Post: 12-07-2006, 01:38 AM

Tags for this Thread

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