On May 03, 2007, at 20:43 UTC, [EMAIL PROTECTED] wrote:
> for c = 0 to len(self.BookcodeField.text)
> if InStr(LegalCharacters, mid(self.BookcodeField.text, c, 1)) =
> 0 then
> return ErrorMsgBox("The Bookcode field contains an illegal
> character.")
> end if
> next
That "c" should start at 1, not at 0.
Also note that every iteration through this loop, you are having the
EditField convert its entire contents into a String... twice! That's a
very expensive (and in this case, wasteful) thing to do. You should
stick BookcodeField.text into a local variable, and just operate on
that local variable inside the loop.
Best,
- Joe
--
Joe Strout -- [EMAIL PROTECTED]
Strout Custom Solutions
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>