>Hi,
>Is there a way to get the combobox.displayvalue (a character value)to show the combobox.value despite the combobox.controlsource value is not spelt the same?
>For example: combobox.controlsource is set to tableA.field1. The rowsource is set to tableB.field1. If a name in tableA.field1 is spelt like "Ann Oswald" and in tableB.field1 spelt like "Ann OSWALD" the combobox.displayvalue shows "" and the combobox.value is "Ann OSWALD", i.e. the combo display is blank. If the name is spelt the same way in both tables, ie tableA.field1=tableB.field1="Ann Oswald" the combobox.displayvalue="Ann Oswald"
Anders,
You might union the controlsource table with combo source table. Then it'd have all the values.
Alternatively you might leave the controlsource empty and use an SQL rowsource where it has upper() or lower() names in a column. ie:
with this
.RowSourceType = 3
.RowSource = 'select myName, upper(myName) as myMatch'+;+
' from names into cursor crsNames'
.ColumnCount = 1
endwith
replace mySource.myName with crsNames.myName in 'mySource'
select crsNames
locate for myMatch = upper(mySource.myName)
OTOH if lookup and source tables had the relation via some other field like a PKID this wouldn't be a problem at all.
PS: If name changing back to Ann Oswald wouldn't be a problem you might simply search in combo rowsource.
Cetin