That only works if the abbreviation starts at the beginning a a new line. I want this to work when the abbreviation is typed in the WHERE clause of a SQL command. Something like:
select * from mytable where obet< space bar>
Since I want the Oracle syntax of BETWEEN, it would return:
SomeFieldName BETWEEN l_value1 AND l_value2
So I would enhance your code to prompt for the field name first, then the 2 values. This is excellent suggestion from your code. Thank you for that. Now if I can just get this to work within a line of code.
>Hi Mark,
>
>I'm not sure if this what you want, but you can modify it to suit your needs:
>
>Add a new blank record in foxcode.dbf, put this:
>
>Type: U
>Abbrev: obet
>Cmd: {}
>Data:
>
>LParameters to_Foxcode
>
>Local l_Value1, l_Value2
>
>If (to_Foxcode.Location != 1)
> Return ''
>endif
>
>to_Foxcode.ValueType = 'V'
>l_Value1 = InputBox( 'Input Value1', 'Custom IS', '' )
>l_Value2 = InputBox( 'Input Value2', 'Custom IS', '' )
>
>Return 'Between ' + l_Value1 + ' and ' + l_Value2
>
>
>You can do the same for the other
>
>HTH
Mark McCasland
Midlothian, TX USA