Clayhead22
Registered User.
- Local time
- Today, 08:33
- Joined
- Feb 22, 2015
- Messages
- 36
Hi All. I am still trying to wrap my head around some of the simple code. Please can someone help with the below.
I have created a button called "Search". When clicking it should look at the data put into 1 or more of 7 text boxes (with search criteria typed in) and filter a continuous form based. The code i have currently is below but it requires all text boxes to be complete to return the records. I want to be able to search via any combination of criteria's
I have created a button called "Search". When clicking it should look at the data put into 1 or more of 7 text boxes (with search criteria typed in) and filter a continuous form based. The code i have currently is below but it requires all text boxes to be complete to return the records. I want to be able to search via any combination of criteria's
Code:
Me.Filter = "[Account ID] = '" & Me.SearchAccountID & "'"
Me.Filter = "[Account Name] = '" & Me.SearchAccountName & "'"
Me.Filter = "[Type] = '" & Me.SearchAccountType & "'"
Me.Filter = "[Postal Code] = '" & Me.SearchAccountPostCode & "'"
Me.Filter = "[Telephone] = '" & Me.SearchAccountTelephone & "'"
Me.Filter = "[Mobile] = '" & Me.SearchAccountMobile & "'"
Me.Filter = "[Mail] = '" & Me.SearchAccountMail & "'"
Me.FilterOn = True