B
Bill Case
I have a library database with each item (book or
whatever) cataloged by multiple criteria. All of the
information is in a single table, call it BOOKS. I would
like to be able to create a form to use combo boxes
and/or text fields to allow users to search for
publications meeting their needs. For example, for a
mechanical engineer might want to look for a publication
based on different things such as the following (I put a
field name after each one):
1. Manufacturer - MANF
2. Product - PROD
3. Representative Name - REPNM
4. Representative Company - REPCO
After the user specifies one or more criteria, the
command button would launch the same simple report
(regardless of the criteria selected), let's call it
RESULTS.
I have connected a combo box to a command button before,
using the following (from a different DB):
-------
Private Sub Command13_Click()
Dim strSQLWhere As String
If IsNull(Me.Combo8) = False Then
strSQLWhere = "StreetName = '" & Me.Combo8 & "'"
End If
DoCmd.OpenReport "Entire List - All Addresses",
acViewPreview, , strSQLWhere
DoCmd.Maximize
End Sub
-------
I don't know how to connect the multiple criteria to the
button, which would basically say "Search".
Any help would be greatly appreciated. Also, apologies
in advance if this should be posted in the Queries
newsgroup.
whatever) cataloged by multiple criteria. All of the
information is in a single table, call it BOOKS. I would
like to be able to create a form to use combo boxes
and/or text fields to allow users to search for
publications meeting their needs. For example, for a
mechanical engineer might want to look for a publication
based on different things such as the following (I put a
field name after each one):
1. Manufacturer - MANF
2. Product - PROD
3. Representative Name - REPNM
4. Representative Company - REPCO
After the user specifies one or more criteria, the
command button would launch the same simple report
(regardless of the criteria selected), let's call it
RESULTS.
I have connected a combo box to a command button before,
using the following (from a different DB):
-------
Private Sub Command13_Click()
Dim strSQLWhere As String
If IsNull(Me.Combo8) = False Then
strSQLWhere = "StreetName = '" & Me.Combo8 & "'"
End If
DoCmd.OpenReport "Entire List - All Addresses",
acViewPreview, , strSQLWhere
DoCmd.Maximize
End Sub
-------
I don't know how to connect the multiple criteria to the
button, which would basically say "Search".
Any help would be greatly appreciated. Also, apologies
in advance if this should be posted in the Queries
newsgroup.