Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2003
    Location
    UK
    Posts
    85

    Question Unanswered: How to leave linked combobox blank in an option group

    Dear All

    I have got an option group with three options. Each option is linked to a combo box. I mean combo boxes have been enabled with each option. So you select an option and then select values from combo box.

    My question is that how is it possible that when an option is selected the other combo boxes become empty (No values remain selected even when is not enabled or faded)?

    The reason is that I have given references of these combo boxes in a query criteria. If values remain selected in combo boxes, my understanding is that the query takes all those values as parameters and brings incorrect data.

    I have struggling with it since this morning. Please help.

  2. #2
    Join Date
    Oct 2003
    Posts
    16

    Re: How to leave linked combobox blank in an option group

    Have you tried setting the .value property of the other combo boxes to "" in the click event of the option button?

    Originally posted by dbase
    Dear All

    I have got an option group with three options. Each option is linked to a combo box. I mean combo boxes have been enabled with each option. So you select an option and then select values from combo box.

    My question is that how is it possible that when an option is selected the other combo boxes become empty (No values remain selected even when is not enabled or faded)?

    The reason is that I have given references of these combo boxes in a query criteria. If values remain selected in combo boxes, my understanding is that the query takes all those values as parameters and brings incorrect data.

    I have struggling with it since this morning. Please help.

  3. #3
    Join Date
    Mar 2003
    Location
    UK
    Posts
    85

    Smile

    Thank you for your reply.

    But in the mean time some another nice guy gave me following simple solution and it worked perfectly.

    On OnLostFocus event of the combo box I have used

    Me.Combobox = Null

  4. #4
    Join Date
    Mar 2003
    Location
    UK
    Posts
    85
    I am sorry there is some correction to make.

    I had not tried it fully. When I clicked on the command button to open the report, the values also disappeared from combo box and it returned with an error of invalid use of Null.

    The correct way is as follows;

    On BeforeUpdate event of option group put following statements

    Me.combobox1 = Null
    Me.combobox2 =Null
    Me.combobox3 = Null

    and it workes fine.

Posting Permissions

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