T
Tony Williams
I have a search form that has a command button that opens a form to show the
results of the form. This is the code behind the OnClick event
Private Sub cmdFind_Click()
Dim strSQL As String
If Not BuildSQLString(strSQL) Then
MsgBox "There was a problem building the SQL string"
Exit Sub
End If
MsgBox strSQL
CurrentDb.QueryDefs("qryExample").SQL = strSQL
DoCmd.OpenForm "copy of frmInstitution", acNormal
End Sub
The qryExample is built at run time with code in a function called
BuildSQLString
The "qryexample" is then joined to another query, "qryjoin" that joins my
two tables, tbldocument and tblInstitution1, and the resultant query,
"qryresults" forms the control source for the form "copy of frmInstitution".
However rather than open the form I would like to populate a list box on my
search form with the results of "qryresults" can someone help me with this
and what additional information do you need?
Thanks
Tony
results of the form. This is the code behind the OnClick event
Private Sub cmdFind_Click()
Dim strSQL As String
If Not BuildSQLString(strSQL) Then
MsgBox "There was a problem building the SQL string"
Exit Sub
End If
MsgBox strSQL
CurrentDb.QueryDefs("qryExample").SQL = strSQL
DoCmd.OpenForm "copy of frmInstitution", acNormal
End Sub
The qryExample is built at run time with code in a function called
BuildSQLString
The "qryexample" is then joined to another query, "qryjoin" that joins my
two tables, tbldocument and tblInstitution1, and the resultant query,
"qryresults" forms the control source for the form "copy of frmInstitution".
However rather than open the form I would like to populate a list box on my
search form with the results of "qryresults" can someone help me with this
and what additional information do you need?
Thanks
Tony