choose form's datasource after mouse click

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
 
P

PC Datasheet

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

The form will automatically requery.
 
Top