using a list box to change form source

A

Army MI

I have a list box linked to a table with 6 entries. what i want to do is
when you click on one of the selections in the list box it chances the record
source of the form itself.
 
M

Mr. B

Army MI,

Try using a Select Case statement in the After Update event of your list box.

Set up a case statement for each of the possible selections in your list box
and use code like the following in each case:

with me.NameOfYourForm
.rowsource = Sql statment or query
.requery
end with

You will need to provide the name of your form and the actual sql statment
or query that you need for each selection in the listbox.

-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
 

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