using a list box to change form source

  • Thread starter Thread starter Army MI
  • Start date Start date
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.
 
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
 
Back
Top