josephbupe
Registered User.
- Local time
- Today, 15:07
- Joined
- Jan 31, 2008
- Messages
- 247
Hi,
I would like to know how to pass a WHERE condition behind my search button on a form to a query so that I can open reports based only on the search results from the Where condition.
This is my code:
I thought this would work, but it doesnt:
I would like to know how to pass a WHERE condition behind my search button on a form to a query so that I can open reports based only on the search results from the Where condition.
This is my code:
Code:
If Len(strWhere) > 0 Then
If Nz(DCount("*", "qryEvents", Left(strWhere, Len(strWhere) - 0)), 0) > 0 Then
strWhere = "WHERE " & Left(strWhere, Len(strWhere) - 0)
strSQL = "SELECT * FROM qryEvents " & strWhere & ";"
I thought this would work, but it doesnt:
Code:
strWhere = "qryEvents_Search"