>Hi all:
>
>I have a combobox, type 2 whihc is populated using a select statement. The field being picked up is numeric.
>
>Do I have to convert that into character string and again covnvert it to a numeric value after the user has made a selection? How do I accomplish this?
>
>Thank you for your advise.
Henry,
If you're using a select statement then IMHO it's better to use RowSourcetype = 3.
You don't have to convert the string into numeric (but you have to if you use .Value or .List(row,col) of combo). When combo has a rowsourcetype which is a cursor/table (Alias,SQL,Query,Fields) as items selected, pointer moves in cursor to related record. Thus you could directly query alias.field even if the field is not one of the columns in combo. ie:
with this
.RowSourcetype=3
.RowSource = 'select company,contact,cust_id, maxordamt'+;
' from customer into cursor crsCustomer'
.ColumnCount = 2
.Columnwidts = '100,100'
endwith
with thisform.myCombo
lcCompany = .List(.ListIndex,1)
endwith
lcCompany = crsCustomer.Company
lnMaxOrdAmt = crsCustomer.MaxOrdAmt
Cetin