Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Expression in View Designer
Message
From
18/03/1999 13:59:24
 
 
To
18/03/1999 13:47:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00198971
Message ID:
00199382
Views:
15
>(ordersdetail.unitprice*ordersdetail.quantity - ((ordersdetail.unitprice*ordersdetail.quantity)*ordersdetail.discount) AS Extended Price

You got this to work with an embedded space in the field name? Lucky, but not wise. Even thought it is technically allowed, you should not make a habit of giving fields name with a space in them, or SQL will get confused.


>My problem is I can't figure out how to put the view into my form and have it update/gel/mesh with the orders form (which is the parent)

What you need is a parameterized view. You should set up a view for the child record that takes the pk of the parent table as a parameter. You do that with the following syntax:

CREATE SQL View MyChildView AS;
SELECT * FROM ChildTable WHERE ChildTable.FK = ?lnParentID

Then, after you change records in the parent table, set lnParentId to the pk of the parent table, and REQUERY() the view.

>What other properties do I need to set?
>Child order
>Link Master
>Record Source

You can relate tables with these properties, but using p-views, you don't need to.

>
>Do I need a Refresh statement somewhere to have it update?

Yeah. wherever the parent record changes, issue:

lnParentID = ParentTable.PK
REQUERY('MyChildView')
THISFORM.ChildGrid.Refresh()
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform