Results 1 to 2 of 2
  1. #1
    Fabio Melo is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2016
    Posts
    1

    Post Change RowSorce according to the Form

    Hi,

    I have a combo box in a subform that is used by 8 forms.
    I want to change the Combo box Row source according to the Forms:

    If form1 then combo box row source = Query1
    If form2 then combo box row source = Query2


    If form3 then combo box row source = Query3
    If form4 then combo box row source = Query4If form5 then combo box row source = Query5If form6 then combo box row source = Query6
    If form7 then combo box row source = Query7
    If form8 then combo box row source = Query8

    thanks

  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,518
    I'd probably use the open event of the subform. You can use:

    Me.Parent.Name

    to get the name of the parent form, and set the rowsource accordingly.
    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. Replies: 3
    Last Post: 04-30-2015, 02:25 PM
  2. Replies: 2
    Last Post: 10-03-2014, 10:07 AM
  3. Replies: 1
    Last Post: 10-04-2013, 02:52 PM
  4. Use a form to VIEW but not CHANGE
    By ZLHysong in forum Access
    Replies: 16
    Last Post: 01-10-2013, 06:00 AM
  5. Replies: 3
    Last Post: 07-20-2012, 11:41 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