N
Neville MADDEN
Good morning everybody
I'm using Access2003 on Windows XP SR2
I want to run a select query using parameters to query a table of placenames
and details. All pretty straightforward.
When I try a click event using the selection of a combo or listbox to set the
criteria in the query { Forms![frmSearch]![cboName] } the query gives a
nil return
nothing happens....the form opens but doesn't display any results.
But when is use a txtBox and manually enter known data and run a command
button everything works as it should
This is the code for the cmd button.
Private Sub cmdSearch_Click()
'Run query and send results to to form
DoCmd.OpenForm "frmPlaceNames", , , , , , "qryMapSearch"
End Sub
Can anyone help me as to why the click event on the listbox doesn't want to
work.
This is the code for the listbox click event
Private Sub lstMap_DblClick(Cancel As Integer)
DoCmd.OpenQuery "qryMapSearch"
DoCmd.OpenForm "frmPlaceNames", , , , , , "qryMapSearch"
End Sub
and the criteria in the query is simply Forms![frmSearch]![cboName]
Neville
Cootamundra NSW
Australia
I'm using Access2003 on Windows XP SR2
I want to run a select query using parameters to query a table of placenames
and details. All pretty straightforward.
When I try a click event using the selection of a combo or listbox to set the
criteria in the query { Forms![frmSearch]![cboName] } the query gives a
nil return
nothing happens....the form opens but doesn't display any results.
But when is use a txtBox and manually enter known data and run a command
button everything works as it should
This is the code for the cmd button.
Private Sub cmdSearch_Click()
'Run query and send results to to form
DoCmd.OpenForm "frmPlaceNames", , , , , , "qryMapSearch"
End Sub
Can anyone help me as to why the click event on the listbox doesn't want to
work.
This is the code for the listbox click event
Private Sub lstMap_DblClick(Cancel As Integer)
DoCmd.OpenQuery "qryMapSearch"
DoCmd.OpenForm "frmPlaceNames", , , , , , "qryMapSearch"
End Sub
and the criteria in the query is simply Forms![frmSearch]![cboName]
Neville
Cootamundra NSW
Australia