Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box Issue/Question VFP8
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00824566
Message ID:
00824572
Views:
28
This message has been marked as the solution to the initial question of the thread.
Kirk,

Since Form.Init() doesn't happen until after cbo.Init() you need to call the cbo.Requery() after you've finished your code below.

You'd also be better served by using an array property of the cbo itself or even a form array rather than a PUBLIC array. Your public array will be altered if you run a second instance of the form.

>
>PUBLIC  ARRAY TaskCategories[1]
>IF SQLEXEC(gnConnHandle,"Select Distinct category from coTaskList order by category","CatList")=1
>	select Category from catList ORDER BY Category into array TaskCategories
>	DIMENSION TaskCategories[_tally+1]
>	AINS(TaskCategories,1)
>	TaskCategories[1]=SPACE(50)
>ELSE
>	TaskCategories[1]=SPACE(50)
>ENDIF
>
>
>thisform.frmcategory=tcCategory
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform