
Originally Posted by
OBP
OK, rather than try and resolve your problem by guesswork on what you are trying to do I will post a copy of the Search 2000 database by Allen Browne to see if the code he uses will give you what you need, it could be something as simple as a missing appostrophy etc.
Or possibly using a function rather than plain VBA.
Other than that I would need a zipped dummy copy of the database (less any personal data) to look at the form and code.
Thanks for responding
That database pails in comparison to mine and has no commonality to my issue as it is not using a Union or UnionAll Querry to merge data from multiple data fields [BathTypes1] & [BathTypes2] into combined results in a singular combo box (cboBathTypes) and then (where my problem is) attempting to sort it out via VBA
Remember that cboBathTypes is retrieving merged data from qry_UnionAll
If my selection from cboBathTypes happens to be originating from [BathTypes1] then this code works:
If Not IsNull(Me.cboBathTypes) Then ' Baths
CustomerType = CustomerType & " And ([BathTypes1] = '" & Me.cboBathTypes & "')"
End If
But If my selection from cboBathTypes happens to be originating from [BathTypes2] then this code works:
If Not IsNull(Me.cboBathTypes) Then ' Baths
CustomerType = CustomerType & " And ([BathTypes2] = '" & Me.cboBathTypes & "')"
End If
I need working code that would work regardless where cboBathTypes data originated [BathTypes1] or [BathTypes2]
I will try to strip down my dbase this weakend to upload if I do not already have resolved
Thx again