Results 1 to 10 of 10
  1. #1
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57

    Click on a Record from a Continuous Subform to open a Report

    I have a form called GetdataFrm. Within it i have a combo box that filter a query. When the combo filters, it populates a continuous subform called GetDataQrysubform. GetDataQrysubform look like a table that contains this Jobcode information:



    EmployeeID Jobcode CardAccess Folders Software


    When I filter the GetDataFrm form, I want to be able to click on a Employee's EmployeeID number from a single record in GetDataQrysubform and then a form called SingleRefrm would pop up taking me to that record.
    So far I have a event procedure coded to open up SingleRefrm, when the EmployeeID field is clicked but its not working. The code looks like this:
    Code:
     
    DoCmd.OpenForm "SingleRefrm", acNormal, , "EmployeeID = '" & Me.EmployeeID & "'"
    Attach is a screen shot of the GetDataFrm.
    Doc2.doc

  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,521
    What does "not working" mean exactly? If EmployeeID is a text field, that code looks fine.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57
    It wont open the SingleRefrm form at all, it is a text field as well.

  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,521
    What event is the code in? Does any code run?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57
    The event is on an on click event. It doesnt run and its not giving me any errors.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you post the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Curious. It works in the double click event but not the click event. Offhand I'm not sure why but I have to head out for lunch before I get cranky.

    By the way, it won't appear to be working when it opens the second form because all the controls are unbound.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57
    Wow thank you. I changed the event from click into double click and had it link to my report I have been playing around with and it worked. Thank you again. Enjoy your lunch!!!!!

  10. #10
    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 did! Happy to help.
    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: 2
    Last Post: 03-13-2013, 06:13 PM
  2. click on report to open more information
    By benjammin in forum Reports
    Replies: 3
    Last Post: 10-08-2012, 11:36 AM
  3. Replies: 6
    Last Post: 08-30-2012, 06:23 PM
  4. Replies: 10
    Last Post: 02-20-2012, 11:25 AM
  5. Report does NOT open on BUTTON CLICK
    By taimysho0 in forum Programming
    Replies: 3
    Last Post: 01-04-2012, 02:38 PM

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