Finding wildcards in code (1 Viewer)

Danny Clarke

Registered User.
Local time
Today, 14:57
Joined
Feb 17, 2000
Messages
16
I'm trying to write a sort of 'quality control' module which looks for mis-typed data in some text fields and corrects it. I'm assuming I want to use wildcard characters in my criteria expression but I can't seem to get the &%**!##* things to work...

The expression I'm using is as below:
strCriteria = "[Field 1] = 'I cannot ty*'"

Followed a little later on by:
rst.FindFirst strCriteria


I've also tried strCriteria="blah... cannot ty'*" and strCriteria="blah... cannot ty'"*
Please help me!

[This message has been edited by Danny Clarke (edited 03-08-2000).]
 
P

Paul Eades

Guest
I think you have to use the LIKE command as per the example

strCriteria = "[Field 1] Like 'I cannot ty*'"

Paul.
 

S

Registered User.
Local time
Today, 15:57
Joined
Feb 17, 2000
Messages
33
You have to use the ansi code for wildcard characters; for example Chr(42) = *, Chr(34) = "
strCriteria = "[Field 1] = 'I cannot ty" & chr(42) & "'"
strCriteria = "[Field 1] = 'I cannot ty" & chr (34) & chr(42) & chr(34) & "'"
Good Luck
 

Users who are viewing this thread

Top Bottom