Results 1 to 3 of 3
  1. #1
    JMZLR is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    30

    Set Label Names As A Variable

    I am setting up a Form with an Option Group Frame of multiple Radial Buttons. Each button has a caption of what the button does. Example: Button one's caption is the name of a report it will print. etc...
    There approximately 6 buttons with different report names and as with Managers and Supervisors the reports are changing or new ones added. I am using Case Statements in the Frame's On Update in properties.

    This is what I'm trying to do is create a variable. The DoCmd has the report name hard coded in it, I know not good, so a variable is needed here. That's my problem, how do I capture the Button's Label Caption and set it as a variable eliminating the
    hard coding. Here is a Case statement for button 1, "DoCmd.OpenReport "Cost Analysis", acViewNormal" and as things change so do Report Names, that is why I need to set a variable set up.

    Do not need someone entering the program to change the Report Name or the Label Caption to reflect new reports. Programmatically changing the Label Caption name is another issue to address later.

    Are there any ideas on the variable issue?



    Thank you...

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Cross posted here with suggestions : https://www.access-programmers.co.uk...riable.315807/
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    JMZLR is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    30
    Sorry for the Cross Post!

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

Similar Threads

  1. Variable Label Form Names
    By DCR in forum Forms
    Replies: 2
    Last Post: 01-05-2021, 08:27 PM
  2. inserting a variable into a label
    By Jen0dorf in forum Access
    Replies: 4
    Last Post: 04-02-2016, 11:02 AM
  3. using dynamic label/variable name
    By Eef in forum Programming
    Replies: 4
    Last Post: 10-19-2014, 06:24 AM
  4. Can Access Column Have Label & Underlying Names?
    By Soule in forum Import/Export Data
    Replies: 1
    Last Post: 12-22-2011, 01:18 PM
  5. Refering to variable form names inside a variable
    By redpetfran in forum Programming
    Replies: 2
    Last Post: 05-21-2010, 01:39 PM

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