A
Alastair MacFarlane
Ken and all,
Thanks for the reply Ken. Somehow, the code below does not work.
Instinctively I think it should.
Works to show all A's:
Public Function MyAgencyContact () as String
strLeftLetter = "A"
strRightLetter = "D"
MyAgencyContact = "'[" & strLeftLetter & "]*'"
End Function
Does not work to show all A through to D:
Public Function MyAgencyContact () as String
strLeftLetter = "A"
strRightLetter = "D"
MyAgencyContact = "'[" & strLeftLetter & "-" & strRightLetter & "]*'"
End Function
If I have an entry with Airdrie Police, it will show in the first one but
not in the second one. No records are returned from the second query
criteria. What I want to do is display all the values in a query with the
first letter of the entry between A - D.
Originally I had MyAgencyContact = "Like '[" & strLeftLetter & "-" &
strRightLetter & "]*'". I have moved LIKE to the criteria grid as suggested
and it is now beginning to annoy me.
Any thoughts I would be appreciated. Thanks again...
Alastair
Thanks for the reply Ken. Somehow, the code below does not work.
Instinctively I think it should.
Works to show all A's:
Public Function MyAgencyContact () as String
strLeftLetter = "A"
strRightLetter = "D"
MyAgencyContact = "'[" & strLeftLetter & "]*'"
End Function
Does not work to show all A through to D:
Public Function MyAgencyContact () as String
strLeftLetter = "A"
strRightLetter = "D"
MyAgencyContact = "'[" & strLeftLetter & "-" & strRightLetter & "]*'"
End Function
If I have an entry with Airdrie Police, it will show in the first one but
not in the second one. No records are returned from the second query
criteria. What I want to do is display all the values in a query with the
first letter of the entry between A - D.
Originally I had MyAgencyContact = "Like '[" & strLeftLetter & "-" &
strRightLetter & "]*'". I have moved LIKE to the criteria grid as suggested
and it is now beginning to annoy me.
Any thoughts I would be appreciated. Thanks again...
Alastair