R
R
Ruslan2013-09-25 08:17:56
Microsoft Access
Ruslan, 2013-09-25 08:17:56

Microsoft Access: developing queries with sorting and grouping like in sql server?

Hello.
I had the task of accounting for some simple business process, which I decided to automate using Microsoft Access, because. I thought that it would be easier and faster to make a single-user base this way, but it was not there.
there are two tables in the database - one is customers, the second is orders, the first is parent, the second is subordinate.
you need to make a list of clients, which also contains the date of the last order, you need to click on the client line and then a window will open (apparently, a form) in which you can see the complete information about the client (and correct it) and a list of all orders sorted by date .
question: how to make a page with a grouped list, should it be a query or a report or something else in terms of access?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Artyom Karetnikov, 2013-09-25
@art_karetnikov

If you are going to rule, then it must be a form. It is impossible to edit reports, to edit in queries is ridiculous.
I would make a form and a subform. Top and two below:
Customer List Customer
Data Customer
Orders
Read more about subforms.

A
Artyom Karetnikov, 2013-09-25
@art_karetnikov

1. Making the main form. In it you have - well, let's say a list of clients. and client id
2. We make a subform - it contains a request with the client id. By these two id you connect both of these forms, in my opinion, even the master can do it.
further, when moving along the lines of the main form, you will automatically get to the same id in the second one. Both forms are tabular. And you can edit directly in them.
3. If you don’t have the strength, as you want by double clicking - well, catch the dbl_click form event and make form open in it.

A
Artyom Karetnikov, 2013-09-25
@art_karetnikov

If the query does not allow you to edit the data - in your case, I would bet that the query was not written correctly, but, for example, there are no key fields and it simply does not understand which table needs to be updated.
How to bind - of course, add the key in both one and the other request. You have it, well - it should be, with a normal structure.
Id_Client must always be in the customer's order. Id_Client must not be in the client information. In the order, this is just an indexed field; in the information, it is the primary key. Knit on them. If both fields are int, everything will fly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question