Results 1 to 4 of 4
  1. #1
    eyuen is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    2

    OpenForm in subform not working

    I have created a form with a datasheet subform. I would like to click on a record in the datasheet subform and have it open and displayed in another form I have created.



    I have created a macro to open this second form, but it gives an error pop up box saying "Enter Paramater Value" and the lists the form/fieldname that it wants. When I enter in the appropriate key value, it brings up the correct record on the second form, but obviously, I want this to happen automatically.

    The weird thing is, when I open up the subform as a form by itself (and not as a subform embedded withing another form), the macro works perfectly without any error messages, i.e. it brings up the other form opened up to the appropriate record.

    Any thoughts?

    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,521
    I don't use macros, so I'd use this technique:

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

    The macro should work though. Since it works when the subform stands alone, it sounds like your reference to it is incorrect. Here's a good reference on the syntax:

    Forms Refer to Form and Subform properties and controls
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    eyuen is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    2

    It worked

    I tried the wherecondition and it worked!

    Thanks.

  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
    Ah good, glad it worked for you. Welcome to the site by the way!
    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. Audit trail not working on form with subform
    By jpkeller55 in forum Access
    Replies: 52
    Last Post: 01-07-2011, 12:39 PM
  2. Filter command not working for subform
    By yes sir in forum Access
    Replies: 15
    Last Post: 10-15-2010, 10:06 PM
  3. OpenForm macro
    By tguckien in forum Forms
    Replies: 3
    Last Post: 07-06-2010, 09:12 AM
  4. Replies: 1
    Last Post: 09-28-2009, 05:21 PM
  5. OpenForm Action and Arguments
    By nkenney in forum Forms
    Replies: 9
    Last Post: 04-05-2009, 09:33 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