R
RG
A dynamically built sql string is assined subform recordsource, ie...
Me.subOrders.Form.RecordSource = ""
DoEvents
'6/19/07:KBS
x = "SELECT ShoppingCarts.CartName, * FROM OrdersQuery LEFT JOIN
ShoppingCarts ON OrdersQuery.CartID = ShoppingCarts.ID"
x = x & " WHERE CustomerID=" & Me.fldCustomerID
x = x & " ORDER BY OrdersQuery.OrderDate DESC"
Me.subOrders.Form.RecordSource = x
-------------------------------------------------------------------
When x is...
SELECT ShoppingCarts.CartName, * FROM OrdersQuery LEFT JOIN ShoppingCarts ON
OrdersQuery.CartID = ShoppingCarts.ID WHERE CustomerID=1285 ORDER BY
OrdersQuery.OrderDate DESC
,
Access closes with message asking me to send it to microsoft. This happens
when x is assigned to Me.subOrders.Form.RecordSource. Also, input? appear in
bound fields
--------------------------------------------------------------------------------------
When x is...
SELECT ShoppingCarts.CartName, * FROM OrdersQuery LEFT JOIN ShoppingCarts ON
OrdersQuery.CartID = ShoppingCarts.ID WHERE CustomerID=632 ORDER BY
OrdersQuery.OrderDate DESC
No problems
----------------------------------------------------------------------------------------
I ran both queries. Both return 1 row with similar results.
Is there a way to perform further debugging when the recordsource is assigned?
Thanks in advance
"SELECT ShoppingCarts.CartName, * FROM OrdersQuery LEFT JOIN ShoppingCarts
ON OrdersQuery.CartID = ShoppingCarts.ID WHERE CustomerID=632 ORDER BY
OrdersQuery.OrderDate DESC"
Me.subOrders.Form.RecordSource = ""
DoEvents
'6/19/07:KBS
x = "SELECT ShoppingCarts.CartName, * FROM OrdersQuery LEFT JOIN
ShoppingCarts ON OrdersQuery.CartID = ShoppingCarts.ID"
x = x & " WHERE CustomerID=" & Me.fldCustomerID
x = x & " ORDER BY OrdersQuery.OrderDate DESC"
Me.subOrders.Form.RecordSource = x
-------------------------------------------------------------------
When x is...
SELECT ShoppingCarts.CartName, * FROM OrdersQuery LEFT JOIN ShoppingCarts ON
OrdersQuery.CartID = ShoppingCarts.ID WHERE CustomerID=1285 ORDER BY
OrdersQuery.OrderDate DESC
,
Access closes with message asking me to send it to microsoft. This happens
when x is assigned to Me.subOrders.Form.RecordSource. Also, input? appear in
bound fields
--------------------------------------------------------------------------------------
When x is...
SELECT ShoppingCarts.CartName, * FROM OrdersQuery LEFT JOIN ShoppingCarts ON
OrdersQuery.CartID = ShoppingCarts.ID WHERE CustomerID=632 ORDER BY
OrdersQuery.OrderDate DESC
No problems
----------------------------------------------------------------------------------------
I ran both queries. Both return 1 row with similar results.
Is there a way to perform further debugging when the recordsource is assigned?
Thanks in advance
"SELECT ShoppingCarts.CartName, * FROM OrdersQuery LEFT JOIN ShoppingCarts
ON OrdersQuery.CartID = ShoppingCarts.ID WHERE CustomerID=632 ORDER BY
OrdersQuery.OrderDate DESC"