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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox rowsource help

Status
Not open for further replies.

ralphcarter

Programmer
Aug 8, 2006
28
0
0
US
Here is my problem:

I have an integer field in a table as the control source for combobox control

I have created a 2 dimensional array as the rowsource for my control. For each row in the array element 1 is character and element 2 is numeric.

I have set the boundcolumn on the control to column 2(the numeric)

I have set the boundto property to TRUE

The column sparse property is set to FALSE

This recipe should display the character values(element 1) and deposit the numeric values(element 2) from the array into the table

Everything works great until:
I set one of the numerics to a negative value. It deposits the negative numeric value into the field but the character element will not display.

Any thoughts? I have searched through here and have found some who think a pageframe might affect this. I am within at least 1 pageframe on the form.

Thanks for the help

Ralph
 
Ralph,

First, you said:

The column sparse property is set to FALSE

Are you sure you are talking about a combo box? Sparse is a property of a grid column -- it has nothing to do with combos.

Be that as it may, I'm not sure why you are getting the behaviour you described, but I'd be very surprised if the pageframe had anything to do with it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I'm sorry I left out part of the description. The combobox is in a column of a grid. The only way to really display the values like this is to set the column sparse property to false.

I didn't expect it to be a pageframe problem either. Just added it because of my research.
 
Everything works great until:
I set one of the numerics to a negative value. It deposits the negative numeric value into the field but the character element will not display.

This one is a bug that has been around for quite a long time. As a matter of fact, I think it was first reported back in 1999 by Steve Dingle on the old Compuserve Fox forum.





Marcia G. Akins
 
for sure, i have misundstood your question. are you trying to convert/show numeric to char ? what you should see in char field when negative ?

nasib kalsi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top