Fill Listbox with 2-D Array

I'd have to chip in that immediate "readability" of code isn't always particularly important.
Once you have working code in place (often in a standard function that you use from various locations) then IMO it can be as complex as it needs to be - you'll rarely, if ever, have to look at it again. (I don't feel particularly constrained in considering future readers of the code other than good commenting - if the function's complex comment for yourself in six month's time! ;-).
You say that because you're one of the intellectuals on this forum. People like me who are less adept - who produce more bugs - can't afford to use semi-readable code where unecessary. We need fully readable code.

In this case concatenating a string (which is analogous to using AddItem) may look simple but I agree with ByteMyzer that string based lists are sluggish - it's one reason why I personally favour assigning a recordset to the list control.
Agreed. I would use a recordset as well.
 
Another advantage to the User-Defined Function method is that, while the Recordset Property is not available to Combo Boxes and List Boxes in earlier versions of Access (some people do still use A97), the UDF will work nicely in its stead.
 

Users who are viewing this thread

Back
Top Bottom