Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2011
    Posts
    3

    Red face Unanswered: Need to make subform visible based upon combobox selection

    In an effort to make my database truly user friendly and dummy proof, I would like to build an expression or macro that would allow me to make a subform visible when a combobox displays a certain selection. Here is the setup:

    I have a main form (header information) and three subforms Crab Survey Data, Bivalve Survey Data and Fish Survey Data. When a combobox (Survey Type) selects Crab, I want the Crab Survey Data subform to become visible. I have read solutions to no avail. Currently I have no expressions built.

    From what I understand this could be done as an expression in the properties of the Survey Type field...is that true? If so, what is the basic syntax? Can I specify all three conditions in that expression? Could this be done through a macro? I would even settle for a button that manually makes the subform visible...at least that would be a start.

    Thanks to anyone that chimes in!

  2. #2
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Use a select case statement in the forms oncurrent event and the combobox's change event that checks the value of the combobox and sets the visible property of the subforms.

  3. #3
    Join Date
    Mar 2011
    Posts
    3

    Syntax

    Do you have any suggestions for the syntax for those expressions?

  4. #4
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    What are the names of your combobox and subforms? What are the three choices in the combobox and which subform should be visible for each?

  5. #5
    Join Date
    Mar 2011
    Posts
    3

    Combo Box Options

    Combo Box: Survey Type
    Combo Box Options: Crab, Bivalve, Fish

    Subforms
    Crab Survey Data
    Bi-Valve Survey Data
    Fish Survey Data

    Thanks for any help you can offer....

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
  •