Load List Box when loading form

D

dhstein

I posted this question before, but I can't see the response so I apologize in
advance if you answered before. I have a list box which displays all
products, but it takes a few moments to load into memory the first time I
access it. Is there a way to get it to load the data as soon as the form is
loaded? Thanks.
 
M

Marshall Barton

dhstein said:
I posted this question before, but I can't see the response so I apologize in
advance if you answered before. I have a list box which displays all
products, but it takes a few moments to load into memory the first time I
access it. Is there a way to get it to load the data as soon as the form is
loaded?


Use a line of code in the form's Load event procedure:

x = Me.thelistbox.ListCount

where x is a variable that's not use for anything else and
thelistbox is your name for the list box.
 
D

dhstein

Marshall Barton said:
Use a line of code in the form's Load event procedure:

x = Me.thelistbox.ListCount

where x is a variable that's not use for anything else and
thelistbox is your name for the list box.

I had some problem seeing the discussions recently, but now I've received
your answer and also Rick Brandt's and you were both very helpful. I got the
list box to load the data and it works great. Thanks for your help.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top