Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004

    Unanswered: Subform On Click Event to Effect Another Subform??? Visible

    I'm trying to get an onclick event in a subform to make another subform visible in the main form.

    I have a Main Form. On the On Click event for a few of the fields I have a small subform, like a message box, that appears to explain to the user the type of data to enter. I've done this by using the following:

    On Click:
    Me.msgsubformname1.Visible = True
    Me.msgsubformname2.Visible = False
    Me.msgsubformname3.Visible = False.

    So each subform is set to visible = No until the field is clicked.

    This works fine.

    However, on the main form I have a subform where more information is entered. I want to to set the On Click event as above and get the 'message' subform to appear with the others in the main form.

    I could use a message box but I like it to appear on the form like a hint! any ideas? Or a better way of doing this?

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    I don't see any reason to use a subform like you seem to be here. Why not just use a textbox as a hint area?

    In any case you might need to look at the Parent property ... Something like:

    Forms(Me.Parent.Name).subformcontrolname!Form.Visi ble = True

    Should do it... or something similar anyway
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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