Can a command button control a list box?

option

Registered User.
Local time
Yesterday, 23:17
Joined
Jul 3, 2008
Messages
143
OK guys, here is what I am aiming for: I have an append query that when run, will display a selection of e-mail addresses and the corresponding report they receive. I have the query to run via command button, and i'm trying to get the e-mail addresses to display in a list box. Now, the way I have it set up works...to an extent.....I have the form on load to clear the table that gets appended. Then the user clicks the button, enters the report name, and the records are appended to the table....but the list box does not display anything. Is there a way to refresh the list box after the button is clicked, or a more efficient way of accomplishing this task?:confused::confused:
 
Yes. Check out the Requery method of the ListBox control. Also you can set any of the properties of a ListBox using VBA.
Then the user clicks the button, enters the report name, and the records are appended to the table...
...and then you can requery the list...
Code:
Me.lstMyList.Requery
If the RowSource of the list queries the data that has just been appended, then that data will appear there.
 
Amazing, that works perfect! Thank you so much!!
 

Users who are viewing this thread

Back
Top Bottom