Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box problem

Status
Not open for further replies.

FoxStudent

Technical User
Feb 24, 2000
85
GB
When ever I use a comma in a combo box option when adding options manually it places the following text into a new option. How do i get over this?
 
FoxStudent, you left out exactly what the following text is; also, what combo box option (property?) are you trying to set?
 
It took me a few minutes to realize what you are doing. I assume you are populating the recordsource property with your values and setting recordsourcetype to 1-value.

Combo.RecordSource='Hey, This is your only choice.' yields:
Combo.List(1)='Hey'
Combo.List(2)=' This is your only choice.'

If my assumption is correct, then the behavior you are referring to is by design. Recordsource uses the comma as a delimiter for the values and AFAIK, there isnt a way around that.

Instead of setting recordsource='Hey, This is your only choice.'

Add the item programmatically in the combo's init event.
PROCEDURE Combo.Init()
THIS.AddItem('Hey, This is your only choice.')
ENDPROC

And you should get the results you desire.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top