Jason,
Hit send to early. You may need to enclose your string in quotes.
Try
SET VAR vQuotes = (CVAL('QUOTES'))
SET VAR vMany = (CVAL('MANY'))
SET VAR vMyVar = (.vQuotes+.vMyVar+.vMany+.vQuotes)
Jan
-----Original Message-----
From: Jason Kramer <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Thu, 01 Apr 2010 14:02:10 -0400
Subject: [RBASE-L] - ON KEYPRESS question
I am trying to write a form that will display a steadily refined list of
names. I have a variable edit and a variable lookup list box. As the user
types in a name I wan the list in the list box to update by dropping all the
invalid names. For example, if my list of names is:
John Doe
Jason Kramer
James A Garfield
James Joyce
And the user types J, nothing will be changed, but if the user types Ja,
then John Doe should be dropped. The problem I am running into is when the
user gets to the point that there is a space in the name. After the user
types a space, the cursor jumps back to the first position in the Variable
Edit and the trailing space is dropped. So far the only way I can find to
work with a space is to type the first and last name together (JamesJ) and
then go back and add the space (James J). The is probably not going to go
over well with the end users.
I am currently using an ON KEYPRESS EEP that starts by getting the
TEXTVALUE of the variable edit and putting it into a variable (GETPROPERTY
vesearchbox TEXTVALUE vmyvar) and then using vmyvar to refine the list:
SELECT COUNT names INTO vnamecount FROM mytable WHERE fname = .vmyvar.
Does anyone know of a way to handle a name (or other string) with a
space in it and retain the space using ON KEYPRESS? I can rewrite the form
so that the search limit is entered and then a button (or an on exit EEP is
fired) to trigger the search, but I thought that a slicker implementation
would have the list being refined automagically (at least as far as the end
user is concerned).
Thanks,
Jason
--
Jason Kramer
University Archives and Records Management
002 Pearson Hall
(302) 831 - 3127 (voice)
(302) 831 - 6903 (fax)