G
guidop12
I hope I can explain this correctly. Here goes.
I have a query that the SQL code is as follows
INSERT INTO CompanyOneYr ( Company, [Total Revenue] )
SELECT TOP 50 [dbo_tblCustomers].[Company], Sum(nz([RevenueTotal],0)) AS
[Total Revenue]
FROM (dbo_tblCustomers INNER JOIN dbo_tblOrders ON
[dbo_tblCustomers].[CustomerID]=[dbo_tblOrders].[CustomerID]) INNER JOIN
qryRevenueDetailTotals ON
[dbo_tblOrders].[OrderID]=[qryRevenueDetailTotals].[OrderID]
WHERE ((([dbo_tblOrders].[CloseDate]) Between [Forms]![Dates]![Date1] And
[Forms]![Dates]![Date2] And ([dbo_tblOrders].[CloseDate]) Between
[Forms]![Dates]![Date1] And [Forms]![Dates]![Date2] And
([dbo_tblOrders].[CloseDate]) Between [Forms]![Dates]![Date1] And
[Forms]![Dates]![Date2] And ([dbo_tblOrders].[CloseDate]) Between
[Forms]![Dates]![Date1] And [Forms]![Dates]![Date2]))
GROUP BY [dbo_tblCustomers].[Company]
ORDER BY Sum(nz([RevenueTotal],0)) DESC;
What I want to do is after the query gets updated once, to then have a form
come up that has the company name and then a list box that has either A, R,
P, C in it. When the user selects one of the choices for each company I would
like to have the query updated with a new column called category with what
the user selects.
Please feel free to ask further questions if needed. And again thank you for
all your help, I'm learning a lot from these forums.
I have a query that the SQL code is as follows
INSERT INTO CompanyOneYr ( Company, [Total Revenue] )
SELECT TOP 50 [dbo_tblCustomers].[Company], Sum(nz([RevenueTotal],0)) AS
[Total Revenue]
FROM (dbo_tblCustomers INNER JOIN dbo_tblOrders ON
[dbo_tblCustomers].[CustomerID]=[dbo_tblOrders].[CustomerID]) INNER JOIN
qryRevenueDetailTotals ON
[dbo_tblOrders].[OrderID]=[qryRevenueDetailTotals].[OrderID]
WHERE ((([dbo_tblOrders].[CloseDate]) Between [Forms]![Dates]![Date1] And
[Forms]![Dates]![Date2] And ([dbo_tblOrders].[CloseDate]) Between
[Forms]![Dates]![Date1] And [Forms]![Dates]![Date2] And
([dbo_tblOrders].[CloseDate]) Between [Forms]![Dates]![Date1] And
[Forms]![Dates]![Date2] And ([dbo_tblOrders].[CloseDate]) Between
[Forms]![Dates]![Date1] And [Forms]![Dates]![Date2]))
GROUP BY [dbo_tblCustomers].[Company]
ORDER BY Sum(nz([RevenueTotal],0)) DESC;
What I want to do is after the query gets updated once, to then have a form
come up that has the company name and then a list box that has either A, R,
P, C in it. When the user selects one of the choices for each company I would
like to have the query updated with a new column called category with what
the user selects.
Please feel free to ask further questions if needed. And again thank you for
all your help, I'm learning a lot from these forums.