J
Jim Sloan
Happy 4th;
Running Access XP and Windows XP
I have a form with a combo box that looks up account numbers. This works
fine.
The subform is based on a query. The query looks at the cmbo for the
criteria "[Forms]![frmSellShares]![cmbAccts] to retrieve the appropriate
records. If I run the query from the db window with a valid selection in
the combo box the query returns the appropriate records.
The query is:
SELECT Accounts.AcctID, CoNames.ID, CoNames.StockSym, Sum(Trades.Shares) AS
SumOfShares, Sum([Shares]*[PricePaid]) AS Invest, CoNames.MutualFnd
FROM Accounts RIGHT JOIN (CoNames RIGHT JOIN Trades ON CoNames.ID =
Trades.CoNamePntr) ON Accounts.AcctID = Trades.AccntPntr
WHERE (((Accounts.AcctID)=[Forms]![frmSellShares]![cmbAccts]))
GROUP BY Accounts.AcctID, CoNames.ID, CoNames.StockSym, CoNames.MutualFnd;
The after update event of the combo is :
sfrmShareSale.Requery
sfrmShareSale.Visible = True
The main and subform are linked by the account_id.
The subform is empty when valid accounts are selected.
Any ideas?
Running Access XP and Windows XP
I have a form with a combo box that looks up account numbers. This works
fine.
The subform is based on a query. The query looks at the cmbo for the
criteria "[Forms]![frmSellShares]![cmbAccts] to retrieve the appropriate
records. If I run the query from the db window with a valid selection in
the combo box the query returns the appropriate records.
The query is:
SELECT Accounts.AcctID, CoNames.ID, CoNames.StockSym, Sum(Trades.Shares) AS
SumOfShares, Sum([Shares]*[PricePaid]) AS Invest, CoNames.MutualFnd
FROM Accounts RIGHT JOIN (CoNames RIGHT JOIN Trades ON CoNames.ID =
Trades.CoNamePntr) ON Accounts.AcctID = Trades.AccntPntr
WHERE (((Accounts.AcctID)=[Forms]![frmSellShares]![cmbAccts]))
GROUP BY Accounts.AcctID, CoNames.ID, CoNames.StockSym, CoNames.MutualFnd;
The after update event of the combo is :
sfrmShareSale.Requery
sfrmShareSale.Visible = True
The main and subform are linked by the account_id.
The subform is empty when valid accounts are selected.
Any ideas?