>>>>Hello guys,
>>>>Is there a way to force the input in a certain way, but display the
>>>>data in the way it truly exist in the table. In example,
>>>>if somebody types "a" in a field while browsing, I want to
>>>>show "a" in the form, not "A", but I still want to be able to
>>>>force the user to type "A" at the form level.
>>>>=this.thanks("in advance")
>>>
>>>Keypress event allows to validate any key and reject/accept them into table. Moreover, if you have unbound textbox you can extend validation until data will be actually saved into a table.
>>
>>Thanks for your suggestion Edward,
>>Let me explain exactly what the problem is. I am converting a system to
>>Visual FoxPro. I have a lot of tables with old data that I imported from
>>old system. In some fields I have data in lowercases or
>>with an expecific pattern like 999-9999. If I set my "Format" property in the
>>texbox to "!", that is uppercases, it will display everything in uppercases
>>even that the data in the table is lowercase. It works fine for the new data
>>that is entered, but it displays wrong information for the data that was
>>already in the table.
>>
>>Did I explain myself right ?
>>Thanks again.
>
>So you want to force users to enter uppercases only, while showing real data (old) in lowercases?
>If it's the case, you could do following:
>1. Clean InputMask
>2. Code Text.KeyPress event
>
>local cKey
>if nKeycode<=122 and nKeycode>=97
> cKey="{"+chr(nKeycode-32)+"}"
> keyboard cKey
> nodefault
>endif
>
Thanks Edward,
I think this should work, I'll give it a try.
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould