Consulting

Results 1 to 3 of 3

Thread: VBA MSAccess - List box

  1. #1

    VBA MSAccess - List box

    Hi, I'm new here and to VBA and MS Access. I'm currently doing a project with list box and im trying to grab data when one of the field is clicked. For example. Application is clicked and it grabs a certain page/data.

    How do i go about selecting what field i want and the information that goes along with it?
    can everything be done in event procedure?. - on click.
    what are the steps? into getting it work. ex. creating a variable for the listbox.etc.

    I attached what my listbox looks like. Incase my explanation isnt clear.

    edit: i have buttons that link to the data/info, but i want to change the buttons so it works with the attached listbox instead of the buttons. i have no clue where to start..
    Last edited by lienlee; 05-26-2010 at 02:32 PM.

  2. #2
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    Might need more to go on. Yes you can do it but what is the destination of the data, a form?
    Peace of mind is found in some of the strangest places.

  3. #3
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    If its a form,then why not simply let Access do all the work? You may have done some of this already.

    Create a form using your table/query as the Record Source.
    Go to the Field List and drag the fields you want retrieved onto the form
    Place a listbox on the form. When the ListBox Wizard comes up:

    Select "Find a record on my form based on the value I've selected..."
    Next
    Select the appropriate identifying field to appear in the Listbox
    Next
    Size the Listbox column
    Next
    Name the listbox
    Finish
    Peace of mind is found in some of the strangest places.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •