Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    150

    Unanswered: Option Group Procedure

    Hi,

    I need to attach code to 2 option groups on a form. The first option group controls these 2 conditions: the other control group is enabled or not and asigns values to three fields in the form.

    In one case, the second option group is enabled and the values in the three fields depend on the choice of this option group, and in the other case, the second group is disabled, and the values to the fields is set to 0.

    The second option group asigns a value to fields by a formula ( different formula in each case ) and sets visibility of each field.

    What would the structure of code have to look like to acheive this?

    Thanks!

    Cheers!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  2. #2
    Join Date
    Dec 2003
    Location
    Belgium
    Posts
    42

    one procedure

    Hi,

    You make one procedure in whitch u say what options are enabled or disabled.

    You call this procedure in the after_update event op each group AND in the on_current event of the form

    Greetz

  3. #3
    Join Date
    Nov 2003
    Posts
    150
    Hi,

    Thanks for the reply, but i think i'm gonna need a little more details about the procedures. Especially about which commands to use. Right now, i'm using these codes:

    ------------------------------------------------------------------------------------

    Private Sub Option63_GotFocus()
    OptionQc.Enabled = True
    OptionCan.Enabled = True
    OptionMaritime.Enabled = True
    LabelTps.Visible = True
    LabelTVQ.Visible = True
    LabelMaritime.Visible = True
    TextTPS.Visible = True
    TextTVQ.Visible = True

    End Sub

    Private Sub Option65_GotFocus()
    OptionQc.Enabled = False
    OptionCan.Enabled = False
    OptionMaritime.Enabled = False
    LabelTps.Visible = False
    LabelTVQ.Visible = False
    LabelMaritime.Visible = False
    TextTPS.Visible = False
    TextTVQ.Visible = False
    TextMaritime.Visible = False
    End Sub

    --------------------------------------------------------------------------------

    I guess the only thing i'm missing is how to enter data into the fields.

    Thanks again!

    Cheers!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

Posting Permissions

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