refresh listbox from another form



On form1 I have an unbound list control whose source is from a query. Is
there any way to activate a refresh of that list with something like
list1.requery from a form2? Thanks.

Sylvain Lafontaine

Yes but usually, you must use the global forms collection, something like:


The [...] are optional if there is no blank space or strange character in
the name. If the control is on a subform, you must access the Form property
of the control:


Notice the difference between the use of the dot . and of the bang !
operators. The bang operator is used for collections of properties that can
vary from Form to Form because you define them while the dot is for static
properties; ie., the properties that are always there. If you use the dot
in place of the bang operator, Access will usually still find the correct
control because it will look everywhere.

Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site:
Independent consultant and remote programming for Access and SQL-Server

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