- Joined
- Jun 13, 2002
- Messages
- 1,794
- Solutions
- 1
- Location
- Dublin
- Website
- www.hopecollectiveireland.com
I've been working on this for a few days with no joy. I have a vba form with 3 combo boxes. I am trying to do a filter for search purposes. The filter works fine if one field or ALL fileds are input. I'd like to search on ONE or ALL filelds. Any suggestions for what to do?
Here is my code
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmOpen"
stLinkCriteria = "[Code1]=" & "'" & Me![Code1] & "'" & " AND
[Code2]=" & "'" & Me![Code2] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Thanks
Niall
Here is my code
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmOpen"
stLinkCriteria = "[Code1]=" & "'" & Me![Code1] & "'" & " AND
[Code2]=" & "'" & Me![Code2] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Thanks
Niall