Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use combo for fields of a record?
Message
From
02/01/2006 18:32:48
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01082503
Message ID:
01082508
Views:
7
>I tried this but it shows entries in these fields for all records in the table. And I want to have the combo show only entries in ONE (currently selected) record.
* combo.init
this.addproperty("aFld[1]")
this.requery()

* combo.requery
n=afield(a,"yourtablealias")
dimension this.afld[n]
for i=1 to n
  this.aFld[i]=eval(forceext("yourtablealias", a[i])
endfor
However, if you have such a table where the entities of the same type are spread across the fields, I'd rather recommend you have a good look at your database design and think it over. There's a good reason why it's so easy to fill a combo with columns from a table, and why you have to do the above kludge to fill it with fields.

If these data are coming from an outside source, my sympathies for your trouble.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform