General information
Category:
Forms & Form designer
>I have 3 differnt letters in one of my fields "D","R",or nothing I want to display 3 differnt words in my grid for each record in that field like if there is a "D" in there it says defaulted or "R" then Redeem would show. Then for the blank one I want to show the word ACTIVE in the cell of my grid. I was able to use the IIF() statement to check for 1 letter but if i have 2 or 3 differnt checks to do iff() only works to check for 1 state. I Tried to put a case statement in the control source for my coloumn but it wont take it. I'm just learning how to program in VFP this stuff probably sounds basic to most of you guys.
> Thanks Kelly
You can use a combobox with an array as the rowsource. The array with have 2 demensions. The first is the display text, the second is the control source. change the property boundcolumn=2 and that will do the trick....
Ex: In the forms init
WITH THISFORM
.AddProperty("alist[1,1]","")
DECLARE .alist[3,2]
.alist[1,1] = "Defaulted"
.alist[1,2] = "D"
.alist[2,1] = "Redeem"
.alist[2,2] = "R"
.alist[3,1] = "N/A"
.alist[3,2] = " "
.Pgf???.Grd???.Col.cboType.RowSourceType = 5
.Pgf???.Grd???.Col.cboType.RowSource = "THISFORM.alist"
.Pgf???.Grd???.Col.cboType.BoundColumn = 2
.Pgf???.Grd???.Col.cboType.Requery()
ENDWITH
Hope this helps....
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only