Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using view for child recs in grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00061673
Message ID:
00062324
Views:
51
>>>Thanks Barbara for reconfirming my observation. Then, isn't using views impractical for displaying child table that have lookup column in this kind of situation? This seems to be a serious drawback to me. Either force an update in the middle of data entry OR having to loose the ability to view lookup info in the grid is a no win situation IMHO. I know you use views a lot for child table viewing so how do you handle it?
>>>
>>>TIA, again.
>>>John.
>>
>>John, are your using the original table for data entry? And then trying to see that information on your view/grid? If this is the case, your will have to save the data before you re-query the view to see the new data in the grid.
>>
>>If you are using the view for data entry, then you should be able to see it whether on the data entry form or in the grid without a requery. Just refresh the grid from the view.
>>
>>As you can see, I'm somewhat confused about exactly what you're doing.
>>
>>Barbara
>
>Barbara.
>Sorry to confuse you with this. Let me try to explain in more detail.
>I have a typical invoice form that have invoice details shown in a grid on this form. The parent table is INVOICE.DBF and line-items are INVOITEM.DBF. The grid, however, needs to show couple of fields from a lookup table related to child INVOITEM table. So, I've created a local view and requery when I move from rec to rec (easy part). In the process of adding a new invoice when I add new rec to this view, I could see the info that would be part of the INVOITEM table but NOT the info from the lookup table. The two lookup items appear blank. Refreshing the grid doesn't seem to help. I can't requery the view since it is buffered(?)
>
>So how can I get those two lookup items to display in the grid without first saving the info (tableupdate)?
>
>TIA
>John.

John, can you put the correct data into these fields in the view?

In your view, the (description) fields from the lookup table are probably not updateable, just the code fields that are in INVOITEM. However, you must be using the LOOKUP table when you are adding records. Just store the required information to the appropriate view field.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform