choose form's datasource after mouse click

  • Thread starter Thread starter mcnewsxp
  • Start date Start date
M

mcnewsxp

i need to change a form's data source after a user makes a listbox
selection.

can i do this while the form is open and requery?
what would be the VBA way to do this.

thanks much,

mcnewsxp
 
Put the following code in the listbox's AfterUpdate event:
Me.Recordsource = "NameOfQueryOrTable"

The form will automatically requery.
 

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

Back
Top