>Want to put some validation in my grid:
>
>1) Want my column to be either S or F. Don't want to use a combo box cause this means click on the dropdown porton of it.
>
>So I put some code in the valid event of my text box in the column, to check if this.value$"FS ", if its not I want a suitable message to appear, seems to get stuck when the validation fails?
>
>Can't remember how to cause a message to be returned
>
>Thanks in advance
Robin,
FWIW never use valid in a grid (suggestion - language supports it though). When you need a validation LostFocus is generally a much better place. ie:
if !this.value $ 'FS'
nodefault
messagebox('F or S only.')
this.Setfocus()
endif
However for just allowing F,S to be entered you don't need any code. Set :
Format : M
Inputmask : F,S && ( or ,F,S if you allow empty value)
Values could be typed either by F,S or using space (space cyles between available values).
Cetin