Results 1 to 2 of 2

Thread: access forms

  1. #1
    Join Date
    Nov 2003

    Unanswered: access forms

    Hey guys!

    I wonder if anyone could help me with this problem! I have designed a form with a combo box, which when selected an item from this box, the relevant information will appear in the sub form on the same form. At the moment I am trying to start the page with no data shown...I have managed this with the combo box (by setting the defualt constant to null) but I am having difficultiy trying to set this to the data boxs in the sub form??? Any ideas??

    Many thanks,


  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    given the following
    sfArea: the name of your sub form area
    myCombo: the name of your combo
    oldForm: the current name of the source form used in sfArea

    then simplest is in myCombo_afterupdate()
    sfArea.visible = not isnull(myCombo)

    but my preferred way is to do something "useful" with the space rather than just hiding the subform.

    copy oldForm to a new form ("newForm")

    delete all controls in "newForm" and replace with the joke of the day, or your company logo, or "Select something from the combo" or something motivating from management or...).

    make "newForm" the default for sfArea

    then in myCombo_AfterUpdate()
    if isnull(myCombo) then
    sfArea.sourceobject = "newForm"
    sfArea.sourceobject = "oldForm"

    currently using SS 2008R2

Posting Permissions

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