Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynamicCurrentControl
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
DynamicCurrentControl
Miscellaneous
Thread ID:
00304937
Message ID:
00304937
Views:
50
To All,

A grid with a RowSource type Alias, the table is 'RELATED', the field 'b_entity', which may be a foreign key into either the 'PARTNER' or 'BUSINESS' tables

I placed two textboxes in the first column, txtPartnerName, bound to PARTNER.last_name, and txtBusinessName bound to BUSINESS.busn_name, and deleted the defualt txtbox. In the column1.DynamicCurrentControl I placed this line

=IIF(INDEXSEEK('RELATED.b_entity', 'PARTNER'), 'txtPartnerName', 'txtBusinessName')

Sparse is .F.

The rest of the grid displays other information from RELATED.

My intention was to display either the person's name or the business name in the first column, along with the 'related' information.

The APPLICATION table is the a_entity keyed into RELATION. My test data had the application related to four applicants, person, business, person, person. It worked the first time with the person names showing, but no entry in the second slot for business. I looked in the business table and discovered that I had forgotten to enter a value. I did so. I tinkered around a bit with the grid, for no good reason, and when I ran it again it was broken! Now the first column is blank, although I still see the rest of the columns. Can anyone tell me what I might have done??

Thanks, Al Allison
Next
Reply
Map
View

Click here to load this message in the networking platform