Results 1 to 4 of 4

Thread: [RESOLVED] I need help refreshing the data from a Combobox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2008
    Posts
    104

    Resolved [RESOLVED] I need help refreshing the data from a Combobox

    Hello everyone:



    I am new in programming, and I have a situation with a combo box.



    I have an "Add new Record" form where I have multiple combo boxes. I have two sites where they may have the same with the same name, I have written a code that would filter the name base on the site, and these are two radio buttons.

    The filtering is working great. The problem that I am having is that when I load the form an click on radio button #1, it filters the names just fine base on the site, but while I am in the form if I change my mind and select radio button #2 instead, it doesn't clear the data that was populated from radio button #1., I have to unload the form to be able to clear the data.

    Thanks,

  2. #2
    Fanatic Member Clanguage's Avatar
    Join Date
    Jan 2008
    Location
    North Carolina
    Posts
    659

    Re: I need help refreshing the data from a Combobox

    All you need to do is to clear the combobox
    vb Code:
    1. Private Sub ComboBox_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox.LostFocus
    2.         ComboBox.Items.Clear()
    3.     End Sub
    CLanguage;
    IF Post = HelpFull Then
    RateMe
    Else
    Say("Shut UP")
    End If
    DotNet rocks
    VB 6, VB.Net 2003, 2005, 2008, 2010, SQL 2005, WM 5.0,ahem ?OpenRoad?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2008
    Posts
    104

    Re: I need help refreshing the data from a Combobox

    Hello Clanguage:

    I wanted to thank you for your quick response

  4. #4
    Fanatic Member Clanguage's Avatar
    Join Date
    Jan 2008
    Location
    North Carolina
    Posts
    659

    Re: I need help refreshing the data from a Combobox

    You're very welcomed.
    Mark the thread as resolved under the Thread tools at the top.
    CLanguage;
    IF Post = HelpFull Then
    RateMe
    Else
    Say("Shut UP")
    End If
    DotNet rocks
    VB 6, VB.Net 2003, 2005, 2008, 2010, SQL 2005, WM 5.0,ahem ?OpenRoad?

Posting Permissions

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



Click Here to Expand Forum to Full Width