Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2003
    Location
    Belfast, UK
    Posts
    87

    Unanswered: clear combobox selection

    How do you clear a combobox value.

    I've tried

    Me!CboDistributionChannel.Value = Null
    And
    Me!CboDistributionChannel.Value = ""
    And
    Me!CboDistributionChannel.RowSource = ""

    And everytime I get a message onscreen saying "you can not assign a value to this object" then it'll clear the box.

    What am I doing wrong.

  2. #2
    Join Date
    Jan 2004
    Posts
    26
    That error usually means that record is locked for editing.

    Make sure the record you are editing is saved before you assign a value to it.

    You will want to use the Null one and be sure the control and the field itself will allow null values.

  3. #3
    Join Date
    Dec 2003
    Location
    Belfast, UK
    Posts
    87
    This is on an unbound form and the command button it's assigned to is the cancel button.

  4. #4
    Join Date
    Feb 2004
    Posts
    106
    This should work:

    Me.CboDistributionChannel = Null

  5. #5
    Join Date
    Jan 2004
    Posts
    26
    Is the control source also unbound?

    If it isn't take out what you have as the control's source and put it in to the Default Value.

    Let me know, if that works,

    Scott

  6. #6
    Join Date
    Dec 2003
    Location
    Belfast, UK
    Posts
    87
    Still can't get it to work.

  7. #7
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Try
    Me.CboDistributionChannel.RowSource=""

Posting Permissions

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