Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use A Variable To Reference A Subform.? (a2k (9.0.6926) SP-3 Jet 4.0 SP-7)

    I have a Form with a continous Subform

    I

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Use A Variable To Reference A Subform.? (a2k (9.0.6926) SP-3 Jet 4.0 S

    Access XP is pickier than 2000 on some things, but I'm not sure what you're referring to as a variable. Is the source object getting set to frm_POS_Detail? Make sure the name of the subform control actually is DetailSubForm and not something else. I use aliases on subforms and subreports all the time in 2002 without problems, but I use Me.DetailSubForm.SetFocus or Me("DetailSubForm").SetFocus instead of DoCmd.GoToControl.
    Charlotte

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use A Variable To Reference A Subform.? (a2k (9.0.6926) SP-3 Jet 4.0 S

    Hi Charlotte

    I tried your suggestions without success.

    If I hard code the Subform from DetailSubForm back to frm_POS_Detail it works OK

    I

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Use A Variable To Reference A Subform.? (a2k (9.0.6926) SP-3 Jet 4.0 S

    What exactly do you mean by "If I hard code the Subform from DetailSubForm back to frm_POS_Detail it works OK"? Are you talking about changing the name of the subform control or using a specific object name instead of a variable. I get the feeling that there's something missing in your explanation. If the name of the subform control is "DetailSubForm", then any attempt to focus on that *control* needs to use "DetailSubForm", so either that isn't the name of the subform control or something else is going on. If the code is running from the parent form, then you MUST refer to the control by its controlname, not the name of the underlying source object. You might try stripping a copy of the the form, subform and the related tables/queries and posting it here. Then we can discuss what should work and why it might not.
    Charlotte

  5. #5
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use A Variable To Reference A Subform.? (a2k (9.0.6926) SP-3 Jet 4.0 S

    I ended up rebuilding the form and seems to be working so far.

    Bottom line is, a corrupted form that worked under a2k OK, however under a2002 generated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •