Now that you've asked me about "ClientID" and tblClients, I realize that "ClientID" is actually a field from another table that contains the exact same data as tblClients.client. After I changed your code to use Client instead of ClientID, it works! It's putting check in the checkbox field tblClients.PortfolioReviewed and adding today's date in the DateofLastReview field. Thanks so much for your help with this!
I hate to get greedy here but if I were to want this sql to toggle the checkbox between true and false each time its clicked, how would I do that? Right now it only marks as true.
Here are the answers to your questions:
What happens if there are 2 "Smith, John" in the table?
tblClients won't allow me to create two records with the exact same client name.
Questions:
1) Is the client last name AND the first name in the field "ClientID"? - this is more of a short name field so it would show "Smith, J" for a client named John Smith.
2) What is the bound column of the list box? - Bound column is 2
3) What is the SQL of the list box row source? - Get ready for this one!:
Code:
SELECT tblMonthlyReview.client AS Client, tblMonthlyReview.Manager AS Mgr, Format([qryClientsWithHoldings].[TotalPortfolio],"$#,##0;($#,##0)") AS [Value], tblMonthlyReview.EquityTarget AS Trgt, tblMonthlyReview.PortfolioModel AS Model, (IIf(Sum(IIf([CashReview]='OK',0,1))>0,'CHECK CASH','OK')) AS Cash, tblMonthlyReview.EquityDriftReview AS [Equity Drift], tblMonthlyReview.DomesticExposureReview AS [US / Int'l], tblMonthlyReview.AssetClassDriftReview AS [Asset Class Drift], qryTestReview.PortfolioReviewed, qryTestReview.DateofLastReviewFROM (tblMonthlyReview INNER JOIN qryClientsWithHoldings ON tblMonthlyReview.client = qryClientsWithHoldings.client) INNER JOIN qryTestReview ON qryClientsWithHoldings.client = qryTestReview.client
GROUP BY tblMonthlyReview.client, tblMonthlyReview.Manager, tblMonthlyReview.EquityTarget, tblMonthlyReview.PortfolioModel, tblMonthlyReview.EquityDriftReview, tblMonthlyReview.DomesticExposureReview, tblMonthlyReview.AssetClassDriftReview, qryTestReview.PortfolioReviewed, qryTestReview.DateofLastReview, qryClientsWithHoldings.TotalPortfolio
HAVING (((tblMonthlyReview.Manager) Like [Forms]![frmMonthlyReview]![Combo141]) AND (((IIf(Sum(IIf([CashReview]='OK',0,1))>0,'CHECK CASH','OK'))) Like [Forms]![frmMonthlyReview]![ComboCashReview]) AND ((tblMonthlyReview.EquityDriftReview) Like [Forms]![frmMonthlyReview]![ComboEquityDrift]) AND ((tblMonthlyReview.DomesticExposureReview) Like [Forms]![frmMonthlyReview]![ComboUSReview]) AND ((tblMonthlyReview.AssetClassDriftReview) Like [Forms]![frmMonthlyReview]![ComboAssetClassDriftReview]))
ORDER BY tblMonthlyReview.client;
4) What is the primary key field of "tblClients"? the primary key for tblClients is tblClients.client