Results 1 to 3 of 3
  1. #1
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235

    List box to choose which form to open

    Wanting the user to choose a form in a list box and then it opens after they click a command button.


    Can someone help me with this?

    Thnx,

    Mike

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    I have a table that holds the list of user choices..
    [Caption]
    [Target]

    The caption lets the user see CLIENTS, but the table is tClients
    It works for any object: queries, reports, etc
    all my tables start with t, all forms start with f, all reports start wth r, queries start wth q., macros start wth m
    the user selects the combo box value
    picks CLIENTS, but the combo bound column = 2 so the value of cboPick = tClients.
    the cboPick_Afterupdate() code determines which vb statement to use:

    Code:
    if not isnull(cboPick) then
    case select left(cboPick,1)
        case "t"
          docmd.openTable cboPick
        case "f"
          docmd.openForm cboPick
        case "q"
          docmd.openQuery cboPick
        case "r"
          docmd.openReport cboPick
        case "m"
          docmd.runMacro cboPick
    end select
    endif

  3. #3
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    Ahh, This helps me greatly,
    Thank You ranman256

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

Similar Threads

  1. Replies: 9
    Last Post: 04-02-2013, 07:22 AM
  2. Make Run Query to open a Form instead of a list
    By damiendellon in forum Queries
    Replies: 3
    Last Post: 01-17-2013, 10:48 PM
  3. Replies: 3
    Last Post: 09-26-2009, 01:57 PM
  4. Open form from a drop down list
    By ildanach in forum Forms
    Replies: 15
    Last Post: 05-21-2009, 05:40 AM
  5. Open Form with a drop down list box
    By Rinehart in forum Forms
    Replies: 0
    Last Post: 08-10-2008, 08:53 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