Results 1 to 7 of 7
  1. #1
    tcullenm3 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    4

    "More Info" button based on Combo Box selection


    I need to create a command button that can be used to see all of the data in the table for whatever name is selected in a combo box. For example, if John Smith is selected from the combo box, the user could click a "More Info" button, which will open a seperate form showing all the data in the table for John Smith. I have searched and searched and how no luck figuring this out. Thanks in advance

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    how about a subform with some filter code behind the combo box afterupdate event? wouldn't that work? you wouldn't have to use 2 forms either.

  3. #3
    tcullenm3 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    4
    A subform may work, but they are looking to leave the main form with as little "clutter" as possible, so thats why they want the seperate form that will pop up only when requested.

    In the event of using a subform, what type of filter code would i need to use? I assume I'd create a "more info" form, with whatever fields neccesary, then add that as a subform to my main form, but am not sure how to get the data to populate to the subform

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    a subform is easy. you can use an RS like so:
    Code:
    SELECT table.* FROM table WHERE table.field = forms!formname!filtercontrolname;
    and then simply requery the subform control object when the button is clicked.

  5. #5
    tcullenm3 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    4
    Rookie question, what is "RS" ?

  6. #6
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by tcullenm3 View Post
    Rookie question, what is "RS" ?
    recordsource. it's a property of a form. (NOT a subform control)

  7. #7
    tcullenm3 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    4
    Thanks, I will see if I can tinker with it from here

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

Similar Threads

  1. Replies: 6
    Last Post: 07-25-2012, 06:42 AM
  2. Customize button "goto last record"
    By bertenbert in forum Forms
    Replies: 1
    Last Post: 12-30-2010, 08:38 AM
  3. Replies: 3
    Last Post: 08-10-2010, 02:12 PM
  4. Replies: 3
    Last Post: 02-23-2010, 06:32 PM
  5. Replies: 1
    Last Post: 10-19-2009, 02:37 AM

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