Results 1 to 4 of 4
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Refer to sub-form from main form

    I dont know why I have trouble with this but I always do. Main form is named Add Products and sub-form is named Add Products SubForm



    I am trying to disable the control TaxStatus on the subform. I tried the below with no luck.


    Forms![Add Products]![Add Products SubForm].Form![TaxStatus].Enabed = False


    OK, I changed the form names so that NO spaces are there, i.e. AddProducts and AddProductsSubForm
    Last edited by burrina; 11-01-2012 at 01:34 AM. Reason: Changed for names

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What is the name of your SubFormControl? That is the control on the [Add Products] for that displays the [Add Products SubForm] SubForm. Not a real good idea to have embedded spaces in an object name. Better to use CamelFontNames.

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Yes, I know it has spaces, my bad. Anyway the name of the subform, see above; is Add Products SubForm and the control is named TaxStatus


    I dont know what CamelFontNames are btw?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Your MainForm has both a SubFormControl *and* a SubForm on it. The SubFormControl is used to display the SubForm on the MainForm and has the Link Child/Master Fields properties on the "Data" tab of the property sheet and the control name on the "Other" tab. I've been using CamelFont in this posting and as you can see it is very readable without spaces in the word.

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

Similar Threads

  1. Replies: 5
    Last Post: 08-03-2012, 04:20 PM
  2. Replies: 7
    Last Post: 07-14-2012, 01:02 AM
  3. Replies: 3
    Last Post: 09-08-2011, 04:40 PM
  4. How do you refer to primary key on split form?
    By techneophyte in forum Forms
    Replies: 3
    Last Post: 08-13-2010, 08:11 AM
  5. Refer to main form
    By terryvanduzee in forum Forms
    Replies: 3
    Last Post: 10-23-2009, 07:02 AM

Tags for this Thread

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