I have a search form that populates a listbox based on the search criteria. I want to doubleclick on one item in the listbox and populate another form. I've used the code that I found here but it does not work for me. The form I am trying to poplulate an EnterAsset form and is based on a query so I am thinking that is my problem but I cannot find a solution. Below is my code. The AssetNum is the first column in the listbox. I've tried using [qryAssetTable].[AssetNum] but that doesn't work. Any ideas. The error message I get with this code is "the openform action was canceled"
Thanks
Code:
Private Sub lstResults_DblClick(Cancel As Integer)
DoCmd.OpenForm "frmEnterAssets", , , "[tblAsset].[AssetNum] = " & Me.lstResults.Column(0)
End Sub
Thanks