zelarra821
Registered User.
- Local time
- Today, 14:54
- Joined
- Jan 14, 2019
- Messages
- 846
Hello. I attach the database with an example on which I am going to expose the problem, so that it is easier to understand the problem. The database is structured in two tables, a main one to enter the budgets, and another sub-table, to enter the concepts of the budgets. In addition, there are two other tables, according to an example that @MajP gave me and that I adapted for this database, so that the client can break down each concept of the budget and decide which one to save later in the budgets sub-table. To create a query that groups and sums the different VAT (IVA), in which three fields of the table Presupuestos are involved: the item itself (artículo), the assembly (montaje) and the transport (transporte), I have created three queries equals in which I calculate the tax base (base imponible) and the VAT, and then create a union query, so that later in the report I only have to add by the budget number. The problem is that in the article query it duplicates the records for me. At first glance, it seems that the TDesglose and TConceptDesglose tables could be eliminated, but they are necessary to calculate the tax base. I have tried to change the type of relationship, but either it gives me an error or it does not solve it, and I do not know what else I can do. Someone could help me? Thanks.