Results 1 to 4 of 4
  1. #1
    Orlandi is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    5

    Consulta de Saldo de Caixa

    Bom dia !
    Este é um segundo post que faço. Talvez eu não tenha me expressado corretamente no primeiro. Vou tentar me expressar corretamente agora.


    Tenho duas tabelas simples. Quero fazer uma consulta com os totais das duas tabelas. É possível ? Click image for larger version. 

Name:	02 Tab Compras.png 
Views:	10 
Size:	108.0 KB 
ID:	49168Click image for larger version. 

Name:	01 Consulta Saldo Cx.png 
Views:	11 
Size:	3.6 KB 
ID:	49169Click image for larger version. 

Name:	01 Tab Vendas.png 
Views:	10 
Size:	110.6 KB 
ID:	49167
    Se puderem ajudar, agraço.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,914
    Non comprende. Lo siento.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Orlandi is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    5
    Good Morning! I have two simple tables. I want to make a query with the totals of the two tables. It's possible?


  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    You need to explain in more details what exactly you want; you seem to have some sort of accounting log so what is the purpose of the totals query?

    To get what you have in the second screenshot you can use domain aggregate functions such a dSum() on the original tables or dLookup on totals queries that are doing the summing first.

    Here are a couple of examples for the Vendas table (notice that you need to enclose the table name in square brackets because you have spaces in their names):

    Total_Valor:dSum("Valor","[1 Vendas - A Receber]")
    Total_Saldo:dSum("Saldo","[1 Vendas - A Receber]")

    You can use this calculated expressions in a query or in a form.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Consulta caixa
    By Orlandi in forum Queries
    Replies: 3
    Last Post: 11-17-2022, 06:40 AM
  2. Replies: 1
    Last Post: 06-25-2021, 08:41 AM
  3. Replies: 8
    Last Post: 05-04-2021, 10:49 AM
  4. Consulta, coluna Calculada "complicada'
    By Zaccariotto in forum Queries
    Replies: 2
    Last Post: 04-27-2020, 09:09 AM
  5. reporte en base a consulta cruzada
    By ute in forum Reports
    Replies: 2
    Last Post: 04-29-2009, 03:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums