General information
Category:
Forms & Form designer
Peter-
>Unfortuntely this won't work. I have a main table called LOG that links to 3 other tables EMP, CLIENT, CODE to get a few fields of information.
Actually, it will work. What you are trying to do is not uncommon. < s> Well, you don't specify what task your combos are intended to fulfill. But, I'm assuming you are using them to give users a set of allowed options for filling in a table's field. So, for example, a combo might be filled from a look up table of states for filling in the state field in a customer's table. Or, you could have combo that is populated by employee's names so the user can pick one employee for filling in the log table's employee field.
First, you need to refresh pages when you activate them. Easiest thing to do is put a this.refresh() in the page activate() method.
Second of all, keep combo rowsources out of relations. The cleanest way I've found is to do the following (rough idea):
1. columncount = 2
2. columnwidths = 200,0
3. controlsource = a table field, or unbound.
4. rowsourcetype = 3
5. rowsource = SELECT TRIM(employee.lastname)+", "+employee.firstname AS cName FROM employee INTO CURSOR vwEmployeeName ORDER BY 1
If you use an unbound combo, then you will want to replace whatever fields in the interactivechange, valid, or lostfocus. Which one depends a bit.
One of the best things to understand in combos is that they work better (IMO) if they are populated from a cursor separate from the cursor that is being updated. That sentance leaves a lot to the imagination, I know, but this is a pretty deep topic.
I'd recommend one of my personal favorite books: Effective Techniques for Application Development with Visual FoxPro 6.0. It's good even if you are using 5.0.
HTH
>Nancy,
>
>Unfortuntely this won't work. I have a main table called LOG that links to 3 other tables EMP, CLIENT, CODE to get a few fields of information. When I blow out the relationships, the entry form page with combos, works fine and they are alphabetized, yeah!! When I flip to page2 the grid, all the column textboxes that hold the info from the other files list the same right down the column even though its different.
>
>The textboxes use control sources like:
> TRIM(employee.lastname)+", "+employee.firstname
>
>I thought about using a view (never tried one) but was prompted in the view wiz that it wouldn't work because I can't have the SAME main table (LOG).
>
>Any other suggestions for the grid without losing the "link" feature for flipping back and forth for editing purposes between the two page frames.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only