Richard Teasdale
asked on
value in combo box vfp
HI:
Probably simply answered but here goes:
Two tables; one salesmen, the other cities. A Form accessing the salesman has a drop down combo box accessing the city. So a salesman can be allocated to New York City, for example. However, the field 'city' in the salesman table is a number, joined to the primary key (also a number) in the city table. The name is a descriptive text field in the city table.
So when a user views the combo field on the salesman form he does not see 'New York City" he sees the number that represents it - 1. Is it possible in vfp to have the name of the city, drawn from the city table, visible in the combo box, rather than its reference number of 1?
Thanks!
Probably simply answered but here goes:
Two tables; one salesmen, the other cities. A Form accessing the salesman has a drop down combo box accessing the city. So a salesman can be allocated to New York City, for example. However, the field 'city' in the salesman table is a number, joined to the primary key (also a number) in the city table. The name is a descriptive text field in the city table.
So when a user views the combo field on the salesman form he does not see 'New York City" he sees the number that represents it - 1. Is it possible in vfp to have the name of the city, drawn from the city table, visible in the combo box, rather than its reference number of 1?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Simple when you know how! Thanks to you and Captain Cyril. Have chosen yours for no real reason, but it works. Good enough for me!
IF SEEK(salesman.city, 'cities', 'id')
cCity = cities.city
ENDIF