Results 1 to 2 of 2
  1. #1
    chrisjack001 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    12

    Opening another form by double click

    I have a form in Access 2007 Database called ReqsAndCategories Subform. When I DOUBLE CLICK a name in the Individual/Group field on that form, I want another form called VendorsNew to open with all the records for that name clicked on in the ReqsAndCategories Subform.Can you pleasehelp me with a code I can use in the Double Click Property field or a better option.
    Note Attached are copies of both forms and the design view and Record Source of the Individual/Group field in the ReqsAndCategories Subform that is the same with the Compressed Person Name field in the VendorsNew table with only the -(FY) field that is attached to the name.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    you'll use this code:
    Code:
    on double click 'for reference only
    
    docmd.openform "newvendors", , , "[vendor] = '" & me.vendorfield & "'"
    alternatively, you can use the last argument in the above command to open it and reference a field on the subform directly using OPENargs:
    Code:
    docmd.openform "newvendors", , , , , [vendor]
    that may not be entirely accurate, so check help if noone else offers a more direct solution. also, I didn't count the commas, so the count of them might be off. again, the help file on "openform" will show you the exact num of args.

    [vendor] is the fieldname of form 2 for which to filter on.

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

Similar Threads

  1. Rescrolling in ListBox on Double Click
    By jackkent in forum Access
    Replies: 6
    Last Post: 09-28-2010, 11:56 AM
  2. Replies: 1
    Last Post: 03-03-2010, 07:29 PM
  3. Form on click
    By rexb in forum Forms
    Replies: 0
    Last Post: 11-16-2009, 08:49 AM
  4. Mouse click to open form
    By darryl.charles in forum Programming
    Replies: 0
    Last Post: 09-05-2008, 10:33 AM
  5. In a field on a Form, on click open another form
    By jackieagra in forum Programming
    Replies: 1
    Last Post: 03-20-2008, 09:44 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