AfterUpdate() vs. Click()

Discussion in 'Web Design & Coding' started by Sanchez, Jul 26, 2004.

  1. Sanchez

    Sanchez OSNN Junior Addict

    The situation is: I have a listbox that lists cord blood ID #'s. When an item is selected from this list, information (such as Date, Type, etc.) are displayed in text boxes; this is taken directly from the table, I made it with a wizard. You can also select a date from the combo boxes and only the blood samples from that date will appear in the listbox. Or you can press a sort button and it will sort the blood samples by date.

    When I open the form or update the listbox (either by the date combobox or sort button), I select the first item in the listbox by:

    If CordLB.ListCount > 0 Then
    CordLB.ListIndex = 0
    End If

    It always selects the first item but the PROBLEM IS when the first item is selected under the Sort_Click() function, the information in the text boxes change to the info of the currently selected item; the first one. THIS is GOOD. However, when the first item is selected under Date_AfterUpdate(), the first item is highlighted but the information in the text boxes does not change. It just stays the same.

    DO you know how I can get the information in the text boxes to update when I select the fist item in the AfterUpdate() function?? THANKS.