- Local time
- Today, 00:10
- Joined
- Feb 28, 2001
- Messages
- 30,043
Good catch, Cronk. There is an extra apostrophe in the section with the 2nd asterisk.
But looking at the original code, I had a V8 moment. (The bruise on my forehead is still healing.)
This will NEVER work because it is using the same quoting characters INSIDE the quoted SQL string as it is using around the string itself. This is why apostrophes are so important.
But looking at the original code, I had a V8 moment. (The bruise on my forehead is still healing.)
Code:
Searchstr = "[LatinName] Like "*plant*" or [CommonName] Like "*plant*" or [Plantedin] Like "*plant*" or [PlantDesc] Like "*plant*" or [HardyRef] Like "*plant*" or [PlantType] Like "*plant*" or [Colour] Like "*plant*" or [Light] Like "*plant*" or [Cultivation] Like "*plant*" or [Propagation] Like "*plant*" or [Pruning] Like "*plant*" or [Pests] Like "*plant*" or [Diseases] Like "*plant*" or [Comments] Like "*plant*"
This will NEVER work because it is using the same quoting characters INSIDE the quoted SQL string as it is using around the string itself. This is why apostrophes are so important.
Code:
Searchstr = "[LatinName] Like '*plant*' or [CommonName] Like '*plant*' or ....