Force Listbox Value w/o Me.Refresh (1 Viewer)

modest

Registered User.
Local time
Today, 12:58
Joined
Jan 4, 2005
Messages
1,220
Hey all :)

Does anyone know how to force the value of a listbox to refresh, without refreshing the form?

The form has a few controls that are based off of linked tables so I don't want to call the Me.Refresh if I don't have to because of delay times and performance issues.

I am doing something like (names have been changed for simplicity):
Code:
Private Sub lstListBox_Click()
   'Me.Refresh
    For Each var In Me.lstListBox.ItemsSelected
        Me.txtTextBox = Me.lstListBox.Column(1, var)
    Next var
End Sub

However, without refreshing the form, the form doesn't notice that the listbox has any items selected. It will just skip over setting the textbox value.

Any suggestions? (I've tried setting the focus of a different control, but this does not refresh the listbox's value)
 

modest

Registered User.
Local time
Today, 12:58
Joined
Jan 4, 2005
Messages
1,220
Thanks, but Refresh is not a valid option for a form's control - this function does not exist
 
R

Rich

Guest
Are you Summing the items selected into a single text box or what?
 

Users who are viewing this thread

Top Bottom