I have a Form with a On Click macro which runs this query below and opens in data sheet view but I need it to be able to open several BGroup.bg_Type's. Is there a way to do this without having to create another Button for Each type listed "A", "B", "C", "D", "E"??? Any suggestion would be greatly appreciated...
SELECT BGroup.ag_ID, BGroup.ag_Type, BData.Bill_To, BData.Payable_To, BData.Payee, BData.PayeeID, BData.TPA_Code, BData.TPA_Name, BData.Plan_Number, BData.Plan_Name, BData.Platform, BData.Rep, BData.Participant_Name, BData.Participant_Acct, BData.Trust_Account_Number, BData.Custodian_Name, BData.TradingLink, BData.FeeType, BData.Descript, BData.BaseAmount, BData.Units, BData.Rate, BData.Amount, BData.LiquidatePlanAssets, BData.Trd_Amt, BData.Settle_Amt, BData.WO_Amt, BData.Move_Amt, BData.InvAmount, BData.Move_Dt, BData.Inv_ExportDt, BData.GP_InvNbr, BData.[3Ppaid_Amt]
FROM BData INNER JOIN BGroup ON BData.BGroupCode = BGroup.bg_ID
WHERE (((BGroup.bg_ID)=[Forms]![Pymt_RPymts]![Pymts_BillGrp]) AND ((BGroup.bg_Type)="A"));
SELECT BGroup.ag_ID, BGroup.ag_Type, BData.Bill_To, BData.Payable_To, BData.Payee, BData.PayeeID, BData.TPA_Code, BData.TPA_Name, BData.Plan_Number, BData.Plan_Name, BData.Platform, BData.Rep, BData.Participant_Name, BData.Participant_Acct, BData.Trust_Account_Number, BData.Custodian_Name, BData.TradingLink, BData.FeeType, BData.Descript, BData.BaseAmount, BData.Units, BData.Rate, BData.Amount, BData.LiquidatePlanAssets, BData.Trd_Amt, BData.Settle_Amt, BData.WO_Amt, BData.Move_Amt, BData.InvAmount, BData.Move_Dt, BData.Inv_ExportDt, BData.GP_InvNbr, BData.[3Ppaid_Amt]
FROM BData INNER JOIN BGroup ON BData.BGroupCode = BGroup.bg_ID
WHERE (((BGroup.bg_ID)=[Forms]![Pymt_RPymts]![Pymts_BillGrp]) AND ((BGroup.bg_Type)="A"));