Access 2000 SubForms

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"
 
A

AccessVandal via AccessMonster.com

My guess is the wild card "*" at "CartName, * FROM OrdersQuery"
^
 
R

RG

That is exacty what it was. But shoudn't it have worked for both queries. I
suppose if there are memory leaks this could be a factor
 
A

AccessVandal via AccessMonster.com

Oh, it will work at ramdom until access crash. I had tested that before.
That is exacty what it was. But shoudn't it have worked for both queries. I
suppose if there are memory leaks this could be a factor
My guess is the wild card "*" at "CartName, * FROM OrdersQuery"
^
[quoted text clipped - 8 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top