Hello Erik -
I apologize for asking so many questions about this one topic, but if I don't ask questions, my chances of completing this form successfully are slim!
Last night I worked on the SQL statement and modified it in the command window, then overwrote the existing SQL. I "think" I was successful, but I want to make sure. After I completed the SQL statement and "browsed" the view, a form popped up that asked me for a parameter, and didn't show me the records in my orders detail table as it had before.
So, I wanted to show you my WHERE statment in my SQL statment to make sure everything was ok.
I understood your SQL statement, minus the last part.
You wrote:
SELECT*
FROM Child table
WHERE Child table.pk = ?lnParentID
So, I went in and changed the SQL statement for my view to:
WHERE ordersdetail.norderid = ?orders.norderid
Quick background:
Orders is primary table
ordersdetail and products tables were used to create my view, which is called exxtended_price_detail
Orders table is linked to ordersdetail (norderid) in a one to many relationship
orders detail is linked to products (nproductid) in a one to many relationship
My question is> Is ?orders.norderid what you were referring to in your lnParentID?
That was the part I was a little confused. The reason being, later in your post, you stated that wherever there are changes in the parent record, to issue the following changes:
lnParentID = ParentTable.pk
REQUERY(extended_price_detail)
THISFORM.extended_price_detail.Refresh()
If this is the case, lnParentID = ParentTable.pk would be:
orders.nordeid = orders.norderid
*** Point being, I just want to make sure I am passing the correct parameter in the WHERE statement.
Last night I read in my programmers guide book that in a scenario where a list box and grid are being set up in a one to many relationship, you need to set up a parameterized view. It said to throw a variable into the selection criterion, so that it read, ?m.Cust_id (at least that is what it used in the example).
I noticed it threw in that ?m.
I was just wondering if that is what you meant with ?lnParentID, that I needed to throw in a variable?
Do I have things set up correctly, or am I missing the boat?
Thanks for your time Erik, I truly appreciate it.
Jason
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