Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox with parent table
Message
From
11/04/1997 10:28:43
 
 
To
11/04/1997 10:14:20
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00027956
Message ID:
00027971
Views:
34
>>>The RowSourceType is 2-Alias, RowSource contains 2 columns of parent table
>>>and controlSource is the field of child table. There is another detail,
>>>in the databases I defined insert rule for child table (referential integrity) like RESTRICT
>>
>> No, if RowSourceType=2 you cannot use '2 columns' as RowSource. What you can do is to make RowSource="parentalias" and ColumnCount=2. It could be the reason. Also, I don't like (personally) to fill ControlSource property.
>
>Maybe I have a wrong concept about combobox.
>
>I will try explain with a example what I am trying to do.
>
>If I have Departament table as parent table and I have Employee as
>Child table. In the form of Employee I am trying to include a combobox
>with description of Departament table and I want to record in the employee
>table de code of departament. So, the user will choose de departament of
>the employee selecting it in the combobox of Departament.

Set Combo properties in Property Sheet:
RowSourceType=6
Row.Source=Dept.Code,Name
ColumnCount=2
BoundColumn=1
Now Combo.Value property will contain Dept.Code which you can use for employee record.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform