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.
 
Back
Top