Help with logic to fill listbox

systemx

Registered User.
Local time
Tomorrow, 04:33
Joined
Mar 28, 2006
Messages
107
Hi there,

I am struggling with the logic behind populating a listbox. The variables are based on checkbox selections from another form.

I have a number of variables A,B,C,D,E,F,G,H.

For each variable that equals -1, I would like to populate the listbox with a string that I determine.

eg.

If A = -1 Then

Me.MyListbox.Rowsource = MyString1

End If



I am really stuck on the logic here to say -

If A or B or C or D (etc) = -1 Then

For each variable that is equal to -1

Get the appropriate string (Mystring1,Mystring2, etc)

And use these strings to populate the listbox.

Can anyone offer me some advice on performing this?

Thanks

Rob


EDIT: Missed the obvious...and that was to use .AddItem instead of rowsource. Fixed!
 
Last edited:

Users who are viewing this thread

Back
Top Bottom