Art-
You say you have three check boxes to indicate one, two, or three bedrooms, but your code references something called cboBedroomCount.
As for the community check boxes, are they all independent, or are they in an option group so that the user can select only one?
If independent, you need to do something like:
Dim strComFilter As String
If Me.chkBearCreek Or Me.chkBlackFoot Or Me.chkBridger Then
strComFilter = "("
If Me.chkBearCreek Then
strComFilter = strComFilter & "(CommunityName LIKE '*Bear Creek*') OR "
End If
If Me.chkBlackFoot Then
strComFilter = strComFilter & "(CommunityName LIKE '*Black Foot*') OR "
End If
If Me.chkBridger Then
strComFilter = strComFilter & "(CommunityName LIKE '*Bridger*')"
End If
strWhere = strWhere & strComFilter & ") AND "
End If
If you can code an exact match on the name of the community, then that would be preferable to using LIKE.
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On May 17, 2017, at 10:25 PM, dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar