Results 1 to 3 of 3
  1. #1
    theosgood is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Location
    Denver, CO
    Posts
    30

    Accessing a subform control from another subform

    How do I reference a subform control from another subform?



    Main Form: frmOfferCreate
    Subform 1: frmVendorSelect
    Subform 2: frmSku Select Activate

    Subform 2 has a hidden button (cmdChangeVendor) (should only be visible if you use subform 1). When in subform 1, when I hit continue, it runs a macro that runs queries and opens subform 2. I want to set the property of the button in subform 2 to visible. You can also access subform 2 from another location, so I can't use the On Load property.

    In the macro I have:
    Action = SetProperty with Control name = subform string, Property = Visible, Value = Yes

    I have tried the following subform strings:

    Forms![frmOfferCreate]![frmSku Select Activate].Form![cmdChangeVendor] - error cant find the form "frmSku Select Active" referred...
    Form_frmOfferCreate![frmSku Select Activate].Form![cmdChangeVendor] - error cant find the field "frmSku Select Activate" referred ....
    Forms("frmOfferCreate")![frmSku Select Activate].Form![cmdChangeVendor] - error cant find the form "frmOfferCreate" referred....

    Any other suggestions?

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614

  3. #3
    theosgood is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Location
    Denver, CO
    Posts
    30
    Thanks. This is a great reference and I am sure it will come in handy. I also found another at http://ss64.com/access/syntax-references.html However, I still can't get sub1 to talk to sub2. Enough for today.

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

Similar Threads

  1. Replies: 3
    Last Post: 03-29-2012, 12:40 PM
  2. Replies: 3
    Last Post: 03-02-2012, 03:27 PM
  3. Replies: 5
    Last Post: 11-16-2011, 07:30 PM
  4. Replies: 5
    Last Post: 10-13-2011, 03:36 PM
  5. Accessing subform fields
    By nkenney in forum Forms
    Replies: 1
    Last Post: 04-21-2009, 10:10 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