>>>>>To make it easier on the user in making a selection from a combo box, I am trying to display information from multiple fields in the combo box. I have successfully done this before with fields from the SAME table, but I was hoping I could also do it with fields from RELATED tables.
>>>>>
>>>>>Below, is the code I entered in the RowSource for the Combo box:
>>>>>
>>>>>vac.nmbr,prlink.fname,prlink.lname
>>>>>
>>>>>I have SET a RELATION between the tables with regard to nmbr (employee number). Obviously, along with employee number, I'm trying display first & last name from the related table.
>>>>>
>>>>>Alas, I get a "'field' phrase is not found" error when trying to run the form.
>>>>>
>>>>>Any help would be greatly appreciated. Thanks.
>>>>
>>>>It doesn't work for combo. However, you can select records into cursor, and use this cursor as rowsource.
>>>
>>>I really appreciate your reply. Although I have some background in procedural xBASE programming, I'm still kind of a neophyte in Visual ... Can you point me in the right direction, please, for doing what you described above?
>>
>>Select vac.nmbr,prlink.fname,prlink.lname Into cursor tmp ;
>>Where vac.nmbr=prlink.nmbr
>>Thisform.combo1.rowsourcetype=2
>>Thisform.combo1.rowsource="tmp"
>>Thisform.combo1.columncount=3
>
>Thanks. Do I place this code in the InitEvent of the form?
Yes, it's appropriate place.
Edward Pikman
Independent Consultant