General information
Category:
Coding, syntax & commands
>>I think I understand your problem now! You need all the names in the list but you only want to select some of them!
>>
>>You could make your select something like this:
>>
>>SELECT IIF(active, '', '\') + name, key etc.
>>
>>This way all records will show, but inactive records can't be selected.
>
>Right! The problem seems to be that I was doing that in a RowSourceType of 3 (SQL) and it didn't seem to work. I still don't know if I was doing something wrong or it only works with certain Types.
I think Jim Booth had it right by using a type of none and building the control yourself with addlistitem.
For instance, if you define a sub-classed combobox you can add the following properties
crowsource
cdisplayfield
ckeyfield
cexcludefield && if filled must be logical and false to be excluded
and then in the requery method of the combo
this.clear
SELECT (this.crowsource)
GO TOP
i = 1
SCAN
IF EVALUATE(this.cexcludefield)
*-- true
this.additem(EVALUATE(this.cdisplayfield), i, 1)
this.additem(EVALUATE(this.ckeyfield), i, 2)
ELSE
this.additem("\" + EVALUATE(this.cdisplayfield), i, 1)
this.additem(EVALUATE(this.ckeyfield), i, 2)
ENDIF
i = i + 1
ENDSCAN
DODEFAULT()
Previous
Next
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