Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Right way with combo box control?
Message
From
02/06/2008 10:26:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Right way with combo box control?
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01320984
Message ID:
01320984
Views:
71
Hi all,

I don't seem to have occasion to use a lot of combo boxes and they always seem to take more work to get going - I need some understanding on them...

Firstly: on a form, after I append a blank, I want to set a default value for a combo box. Should I a) update the view field that it is bound to or b) stuff the control with the value to be found (they both seem to work but wondering if one is better than the other or does it matter)

Secondly: this combo gets it's rows from an array that is 5 columns and a few rows wide; first column is the display (a name) and second column is an ID number for the user (numeric); so I have it bound to the 2nd column and the control source of that is a numeric field in a view; that worked on an edit right off but was having trouble when I defaulted to a value on an append blank (the control would not display the name that it was supposed to default to).

I got this working by changing "BoundTo" to .T. - but I find the help quite confusing - I just wanted to know why this setting was ncessary and what it was doing. Can anyone explain to me what this means and/or what it is doing?

Finally, when I check the control's properties at run time, List and ListItem are always empty character and ListIndex and ListItemID are numeric and are set to the row contained in the array (numeric). If I want to access the other columns in the array (cols 3 and 4 contain birthdate etc), should I used ListIndex or ListItemID to access them (or does it not matter if the list is static).

Thanks,
Albert Gostick
Next
Reply
Map
View

Click here to load this message in the networking platform