Results 1 to 4 of 4
  1. #1
    Jean1987 is offline Novice
    Windows XP Access 2000
    Join Date
    Sep 2012
    Posts
    4

    HELP! How to open a second form to the record selected on the first

    This is driving me crazy! I am looking open a second form to the record based on the first form.



    I have two forms (Search By Accounting Code & MEMBERS) The MEMBERS Form has multiple sub forms and is very useful in looking at the billing, services and notes for each member; however, i can only search by fields in the Orginal form. To get around this, I created search forms accessiable by my switchboard and linked to a query. For instance on the Search By Accounting Code Form i would give the parameters and it would return the Accounting Code, Member Name and Member_ID_Code (primary key on the table associated with the form l want the command button to open)

    I created a Command button on the Search By Accounting Code Form and used the following code
    DoCmd.OpenForm "MEMBERS", , , "Member_ID_Code = '" & Me.ControlName & "'"

  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
    Does that error, or?? That looks correct for a text value. If it's numeric the syntax is slightly different:

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

  3. #3
    Jean1987 is offline Novice
    Windows XP Access 2000
    Join Date
    Sep 2012
    Posts
    4
    Thank you for the assistance. Dummy me! the member id code is an auto number.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help, and welcome to the site!
    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: 1
    Last Post: 05-03-2012, 02:25 PM
  2. Replies: 7
    Last Post: 05-01-2012, 11:43 AM
  3. Replies: 3
    Last Post: 03-03-2012, 03:54 PM
  4. Replies: 1
    Last Post: 03-31-2011, 12:18 PM
  5. Loading the form with selected record
    By emilylu3 in forum Access
    Replies: 1
    Last Post: 12-09-2005, 07:49 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