Must be another obtuse day... By passing the parameter of the column name, your routine checks the length and text values in the NAME of the column, not the VALUE in the column.
Table: Assigned Column: Claim# User enters any of the claim number formats - I can run the command to strip out the non-numeric values and end up with a value of, say '00051334944' for the variable "vtest" The values in the table that should match to this "vtest" variable are: SELECT Claim# FROM Assigned '00-051-334944' or '00 051 334944' or '00/051/33494AZ' The statement: SELECT Claim# FROM Assigned WHERE (call KeepNum(Claim#)) = .vtest should return the same list of values as above. The way you posted it (with the two corrections) the SELECT COUNT(*) statement is returning a count of ALL the rows in the table. Am I just not understanding what should be returned? TIA - Sami > > ================================================ > TO SEE MESSAGE POSTING GUIDELINES: > Send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: INTRO rbase-l > ================================================ > TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: UNSUBSCRIBE rbase-l > ================================================ > TO SEARCH ARCHIVES: > http://www.mail-archive.com/rbase-l%40sonetmail.com/ > > > ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
