Hi
i had a form (form2) with a listbox that displays the numbers from 1-12(representing the number of month) and a txtbox on which the user enters the year.
now i want to run a query with the criteria taken from this form ,that displays all the orders in the case of both listbox and txtbox are blank. in case that the user fills only the listbox(months) display all the orders that were made in that month at every year...
User Profile
Collapse
-
Query by form with different textbox criteria
-
abadaysheker2 replied to Query to get the number of units sold of every product at each month of the yearin Accesswow thank you very much,at first look it looks perfect , i will check it with more detail, just to make sure.
can you explain a little more about what was the error, and how did you fix it,so the next time i will be able to fix it myself -
abadaysheker2 replied to Query to get the number of units sold of every product at each month of the yearin AccessTHIS IS THE SQL
...Code:SELECT products_tbl.NameProduct, Month([DateEntered]) AS MonthOrder, Year([DateEntered]) AS YearOrder, Count(OrdersDetails.Quantity) AS CountOfQuantity FROM products_tbl INNER JOIN (orders INNER JOIN OrdersDetails ON orders.[or-id] = OrdersDetails.[or-id]) ON products_tbl.NumberProduct = OrdersDetails.NumberProduct GROUP BY products_tbl.NameProduct, Month([DateEntered]), Year([DateEntered]);
Last edited by Rabbit; Jul 9 '14, 05:02 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.Leave a comment:
-
abadaysheker2 replied to Query to get the number of units sold of every product at each month of the yearin AccessHi twinnyfo
fist let me thank you for your interest to help, i really appreciate it.
please excuse my ignorance ,i'm new into forums, so i don't really know how to upload an image into the post, or how to get the url ,for what i understood on the internet i have to get the image first into a server.
i hope that a dropbox link will be fine,so i'm sending you an image to show you the relationships and the query...Leave a comment:
-
abadaysheker2 started a topic Query to get the number of units sold of every product at each month of the yearin AccessQuery to get the number of units sold of every product at each month of the year
Hi
i have 2 tables: ordersTbl with the fields (orderId,Custom erId,Date)and ordersDetailsTb l with the fields(orderId, CustomerId,Prod uctId,quantity, DestailId-autonomber)
i want to get a query that tells me how many units of each products were sold every month, at any given year.
i had tried to use the count on the quantity field grouped by ProductId,and that works, but when i add the date (using a 2 calculated... -
Yes i'm trying to create a form to add records to the orders table and the orders-details table.
can you explain me how to create the unbound form with details, because i'm new into access
thanksLeave a comment:
-
Creating a simple form to Add new records to the table Orders
Hi
my Data Base consist of the following tables:
Customers,Produ cts, Suppliers,Order s,Orders_Detail s
the relationships are as follow
Customers-Orders ( one to Many relational field customer-id)
Supplier-Products(one to many relational field supplier-id)
orders-orders_Details( one to many relational field order-id)
I have the information of my orders divided in 2 tables...
No activity results to display
Show More
Leave a comment: