Results 1 to 7 of 7
  1. #1
    BrainKing is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    5

    How can I make a label a button?

    Hello,



    How can I make a label open up a table? I want the label to have a background colour of orange because you can't do it with a normal command button I believe.

    Any idea?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    As answered elsewhere, a label has a click event that can do anything a button can do.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I would add that you can make the button back style transparent and put a label of the desired color behind it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    BrainKing is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    5
    Forget it. I made a command button but I can't find the event where it opens up a table..only add record, delete record, duplicate etc. I want a table opened.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I would never open a table directly for a user, but the command would be:

    DoCmd.OpenTable...
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    BrainKing is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    5
    Can't find the Macro DoCmd :O

    My table name is Customer Details

    what would the exact command be and where would I write it?

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I don't use macros, but the macro action would be OpenTable. What I gave was VBA code, which would go here:

    http://www.baldyweb.com/FirstVBA.htm

    And VBA help would have the full syntax and available options.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Saving Label on the Fly
    By frobro390 in forum Forms
    Replies: 3
    Last Post: 10-07-2010, 10:52 AM
  2. Formatting a label
    By swicklund in forum Reports
    Replies: 4
    Last Post: 08-24-2010, 03:27 PM
  3. Label in Report
    By devcon in forum Forms
    Replies: 3
    Last Post: 07-10-2010, 12:29 AM
  4. make Add Record button work
    By janjan_376 in forum Forms
    Replies: 3
    Last Post: 06-05-2009, 04:22 AM
  5. A Label in a Switchboard
    By Hawkx1 in forum Forms
    Replies: 1
    Last Post: 07-09-2008, 12:37 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