List Box

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hi,

I have a List Box on a Form (only a list Box) & what I
would like to do is as certain processes are running in
the background for after each process is done to update
the List box what was done with some text saying what was
done.

I am able to do this with.

lstProcess.Additem "what is going on..", 0

However what is not working & I would like help on is
all the processes happen & then the List Box on the Form
opens & inside are all the things I added. It is not
displyaing first & udating only when all is done.

What I would like is for the List Box to display right
away when the Form opens & then as each process happens
for the List Box to be updated on screen while other the
other processes continue running in the background & then
the next is updated to the list & so on.

I tried playing around with
DoEvents and
Me.Repaint

I also tried playing around with putting it in different
Event in the Form line OnCurrent, On Activate, etc.

But whatever I try I can not get it to work like I
mentioned above.

Any help would be greatly appreacited.

Thank you,
Jeff
(e-mail address removed)
 
-----Original Message-----
Hi,

I have a List Box on a Form (only a list Box) & what I
would like to do is as certain processes are running in
the background for after each process is done to update
the List box what was done with some text saying what was
done.

I am able to do this with.

lstProcess.Additem "what is going on..", 0

However what is not working & I would like help on is
all the processes happen & then the List Box on the Form
opens & inside are all the things I added. It is not
displyaing first & udating only when all is done.

What I would like is for the List Box to display right
away when the Form opens & then as each process happens
for the List Box to be updated on screen while other the
other processes continue running in the background & then
the next is updated to the list & so on.

I tried playing around with
DoEvents and
Me.Repaint

I also tried playing around with putting it in different
Event in the Form line OnCurrent, On Activate, etc.

But whatever I try I can not get it to work like I
mentioned above.

Any help would be greatly appreacited.

Thank you,
Jeff
(e-mail address removed)
.
Hi Jeff,

without more information regarding the code process I can
only provide the following thoughts...

docmd.openform "frmListbox"
doevents

the first line opens the form. the second line pauses
processing until all backlog of window events run. for
example doevents will allow you to switch to another
application and then back again. without doevents you
would switch to another application but not back again
until all running code ended. in your example it,
hopefully, will allow the form to load fully before
running further lines of code.

hope this helps somewhat :-)

Luck
Jonathan
 
Back
Top