Access double click event to open query in listbox

800 Views Asked by At

I have a listbox in a form that displays all available queries in the database. I need to setup a double click event that when a query in the list box is selected it opens that query. In my googling all I'm finding is how to setup a double click event to open a specific record in a form. Any help would be appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

You can do this on the Listbox control's DblClick event.

Private Sub YourListBoxControlName_DblClick(Cancel As Integer)
    DoCmd.OpenQuery Me.YourListBoxControlName.Value
End Sub