Results 1 to 12 of 12
  1. #1
    Join Date
    Jul 2002
    Posts
    15

    Unanswered: Make tab visible on subform

    How do you set a tab on a subform to visible? I have it defaulted as visible = False. When I click on a list, I want it to be visible = True. This is not the whole subform, only a tab on the subform. The code I am trying to use is subformContactLog!pgUpdateContact.Visible = True. I receieve an error message with this code. "Can't find field 'pgUpdateContact' referred to in your expression." What am I doing wrong? I am using Access 2000. Any help would be greatly appreciated! Thank you!

  2. #2
    Join Date
    May 2002
    Location
    Atlanta, GA
    Posts
    117
    Hey Jill,

    When using a subform you usually have to set the Focus of that particular subform before you can apply any field settings. Try and set the focus of the subform and then changing your tab setting to visible = True.


    Later, Kal

  3. #3
    Join Date
    Jul 2002
    Posts
    15
    Kal -

    I tried setting the focus to the subform but now have a new error. It says "Can't move focus to the control subformContactLog". AHH! Any ideas of what I should do? Thanks for your idea.

    Jill

  4. #4
    Join Date
    May 2002
    Location
    Atlanta, GA
    Posts
    117
    Please post the command your trying to use.

    Kal

  5. #5
    Join Date
    Jul 2002
    Posts
    15
    Sorry - it's subformContactLog.setfocus

  6. #6
    Join Date
    May 2002
    Location
    Atlanta, GA
    Posts
    117
    Try:

    Forms!subformContactLog.SetFocus

    Then:

    Forms!subformContactLog.YourField.Visible = True

    Kal

  7. #7
    Join Date
    Jul 2002
    Posts
    15
    Kal -

    I'm still receiving the same error. I used your code.

    Jill

  8. #8
    Join Date
    May 2002
    Location
    Atlanta, GA
    Posts
    117
    I'm sorry I should have tested that first. Here you got

    Me.subformContactLog.SetFocus
    Me.subformContactLog.pgUpdateContact.Visible = True

    Kal

  9. #9
    Join Date
    Jul 2002
    Posts
    15

    Red face

    I'm still getting the same error... Can't set focus to that subform. I have no clue why this doesn't work..

  10. #10
    Join Date
    May 2002
    Location
    Atlanta, GA
    Posts
    117
    Okay????

    Try this, change to match your form names:

    MainForm= The name of your main form
    SubForm= Then name of your sub form

    Forms!MainForm!SubForm.SetFocus

    also, you don't have a subform within a subform do you?

    Kal

  11. #11
    Join Date
    Jul 2002
    Posts
    15
    No, it's just a main form with a subform.
    And, I tried that also and still get error...
    Thank you so much for your help! I am racking my brain trying to figure out why this won't work.

  12. #12
    Join Date
    May 2002
    Location
    Atlanta, GA
    Posts
    117
    Hey,

    I would double check all your form names to make sure they are accurate and without spaces. Same with field names. If all of that comes back true then try and make a mock form with a subform just to test. I have found that some times forms in access just screw up for no apparent reason. Creating a new one from scratch usually fixes this problem.

    Sorry, and let me know if you have any luck.

    Kal

Posting Permissions

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