Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox Clear
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01153524
Message ID:
01153602
Views:
14
This message has been marked as the solution to the initial question of the thread.
>Hi everybody,
>
>I have a department combobox with the following code in the InteractiveChange (not mine originally) to populate the other combobox:
>
>
>local lcValue
>with thisform
>	.cboLetterType.clear()
>	lcValue = alltrim(this.value)
>	.cmdSelector.enabled = .f.
>
>	select cDepartments
>	locate for alltrim(cDepartment_name)  = m.lcValue
>	if found()
>		lcValue = cDepartments.cDepartment_code
>	endif
>
>	store .f. to .optSelection.enabled, ;
>		.txtAdmitDate.enabled, ;
>		.txtAccountNumber.enabled
>	.optSelection.value = 1
>	.txtFile_Name.value = ""
>	.cboLetterType.addlistitem("FR - FIELD REQUEST")
>	.cboLetterType.addlistitem("UB - UB92 FORM")
>	select cLetter_masters
>	scan for inlist(cLetter_masters.cDepartment_code,"A", m.lcValue)
>		.cboLetterType.addlistitem(cLetter_masters.cLetter_Description)
>	endscan
>endwith
>
>Now, I select a department, select some item in the Letter Type combobox. Then I go back to department combobox and select another department. My letter combobox is still pointing to the selected item. I need it to become blank.
>
>What should I do?
>
>Thanks in advance.
.....
with thisform
     .cboLetterType.clear()
     .cboLetterType.Value = [] && Or empty value depending of type
     .cboLetterType.Refresh()
.....
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform