Results 1 to 5 of 5
  1. #1
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146

    opening specific record on a form from a report button

    Click on a button, enter search criteria, report shows results with another button for each line item. I want to click on the line item button which takes me to the form for this line item.



    The search criteria is a serial number. There are many Models with serial numbers with their own forms. How do I open the right form with the right serial number?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    open the form using the current record ID,
    docmd.openform "fMyForm",,,"[id]=" & txtID

    report:

    docmd.openReport "rMyRpt",acViewPreview, ,"[id]=" & txtID

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    In case the field is text:

    http://www.baldyweb.com/wherecondition.htm

    You mention different forms; you'd need some way of identifying which form to open. And we'd be curious why there were different forms for different models.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146
    Different forms for Models because each Model is different than another with its own unique set of characteristics.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I might have gone a different way, but you know your situation better and at this point it is what it is. You still need some way of knowing which form to open based on whatever data is in the initial form/report.
    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: 20
    Last Post: 05-19-2015, 05:10 AM
  2. Replies: 5
    Last Post: 01-24-2015, 12:59 AM
  3. Opening Form to a Specific Record
    By PPat in forum Forms
    Replies: 9
    Last Post: 04-24-2013, 08:47 PM
  4. Help with opening form to specific record
    By manic in forum Programming
    Replies: 7
    Last Post: 09-18-2012, 08:44 PM
  5. Replies: 3
    Last Post: 01-14-2010, 08:32 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