Emmitt, Thank you, You are a true master of RBase! I have been on the drawing board this morning. This is what I've come up with!
In the On Before EEP in the form set var vSPC = 0 -- space button press set var vSPACE = (char(32)) --check for space button press if vSpc = 1 then set var vfield = (.vfield+.vSPACE+.vAb) set var vSpc = 0 else set var vfield = (.vfield +.vAb) endif this one does not work because the vSPACE does not include the hard space in the vfield var expression --check for space button press if vSpc = 1 then set var vfield = (.vfield+(char(32))+.vAb) set var vSpc = 0 else set var vfield = (.vfield +.vAb) endif --check for space button press if vSpc = 1 then set var vfield = (.vfield&vAb) set var vSpc = 0 else set var vfield = (.vfield +.vAb) endif This use of (char(32)) and & in the var vfield works! This behavior is ok for this application example! Thank you again! Best Regards, Oma Cox O.C. Services Inc. P.O. Box 5485 Brandon, MS 39047 662.820.7599 601.992.6785 www.ocservicesinc.com -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Emmitt Dove Sent: Saturday, June 06, 2009 5:48 AM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: SPACE ADDED TO A VAR FIELD IN A FORM Oma, Sorry, I was using the term "key pressed" ... change that to "button clicked" and the example should work. We use that on touch-screen units ourselves. The trick is to recognize that you cannot add the space to the string when it is clicked - you have to invent a method to remember that click until the next one, and add the space then. Emmitt Dove Manager, Converting Applications Development Evergreen Packaging, Inc. [email protected] (203) 214-5683 m (203) 643-8022 o (203) 643-8086 f [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of OmaYahoo Sent: Saturday, June 06, 2009 2:18 AM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: SPACE ADDED TO A VAR FIELD IN A FORM Emmitt, Thank you for your response but there is no keyboard to press the space bar to enter the space! It is a touch screen! I agree with your example if I was using a keyboard! The space button value is defined in the on before eep of the from vSpace is set to either ' ' and char(32) --space button eep set var vfield = (.vfield+.vSPACE) recalc var return --Ab button eep Set var vbuttonvalue = 'Ab' Set var vfield = (.vfield+.vbuttonvalue) recalc var return --Ao button eep Set var vbuttonvalue = 'Ao' Set var vfield = (.vfield+.vbuttonvalue) recalc var return If I press button Ab then the space button then the Ao button there is not space between the Ab and Ao entry. The space charater does not add to the var. I'll use the '.' for the time being until I can determine a way to do this! Best regards, Oma Cox O.C. Services Inc. P.O. Box 5485 Brandon, MS 39047 662.820.7599 601.992.6785 www.ocservicesinc.com -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Emmitt Dove Sent: Friday, June 05, 2009 4:52 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: SPACE ADDED TO A VAR FIELD IN A FORM Oma, Your eep needs to be a bit more intelligent, and keep track of the previous key pressed. So, when a user hits a space bar, set a variable telling you that the previous keypress was space, then when the next key is pressed, test for the previous key being a space and add the space at this time. Something like this: vstring = the string you are assembling SET VAR vkeypressed TEXT SET VAR vprevkey TEXT IF vkeypressed = (CHAR(32)) THEN SET VAR vprevkey = 'space' RETURN ENDIF IF vprevkey = 'space' THEN SET VAR vstring = .vstring & .vkeypressed SET VAR vprevkey = 'not_a_space' ELSE SET VAR vstring = .vstring + .vkeypressed ENDIF RETURN You can do the same thing with a backspace key if the position just before the character just deleted is a space. Emmitt Dove Manager, Converting Applications Development Evergreen Packaging, Inc. [email protected] (203) 214-5683 m (203) 643-8022 o (203) 643-8086 f [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of OmaYahoo Sent: Friday, June 05, 2009 3:59 PM To: RBASE-L Mailing List Subject: [RBASE-L] - SPACE ADDED TO A VAR FIELD IN A FORM Hello everyone! I have a var field on a form I have several buttons defined with different alpha characters. I'm using this on a touch screen! No keyboard for entry. I have each entry display as they are entered using the var field. Like vField = (.vField+.vNewButtonValue) The one thing I need to do is some times a space is needed between the alpha characters entered. The space requirement is random. I've attempted to define a space button using either ' ' or (char(32)) The var using ' ' does not added a space after the previous button pushed or the next button after the space button is pushed. The same for var = (char(32)) I have a work around but it involves using '.' as space After completion of the field entry I replace the '.' with ' '. vField = (SRPL(.vField,'.',' ',0)) The users think this is a little strange seeing a '.' instead of a space! Does anyone have any suggestions? Best Regards, Oma Cox O.C. Services Inc. P.O. Box 5485 Brandon, MS 39047 662.820.7599 601.992.6785 www.ocservicesinc.com

