Results 1 to 3 of 3
  1. #1
    ano is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Nov 2023
    Posts
    62

    new wizard form from qry give popup without using parameter

    SELECT a.dt, sum(a.bal) AS bal, (SELECT sum(b.bal) AS [bal1]
    FROM bal b
    where datediff("d",b.dt,a.dt) between 10 and 50 and dm=0
    GROUP BY b.dt
    order by b.dt) AS bal2
    FROM bal AS a
    WHERE dm=0
    GROUP BY a.dt
    ORDER BY a.dt DESC;


    SELECT a.dt, a.bal, ( a.bal - a.bal2) AS sav
    FROM [bal Query] AS a
    ORDER BY a.dt DESC;

    this works as needed
    but form data has filter filled with bnk=8 not on load and order with dt desc wich give popup
    both lines removed solve the problemClick image for larger version. 

Name:	Screenshot 2024-03-30 080359.jpg 
Views:	17 
Size:	104.4 KB 
ID:	51649Click image for larger version. 

Name:	Screenshot 2024-03-30 080359.jpg 
Views:	17 
Size:	104.4 KB 
ID:	51649

  2. #2
    madpiet is online now Competent Performer
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    157
    Since [bnk] isn't in the underlying recordset that the form is based on, how is the data engine supposed to figure out where the value of [bnk] comes from?
    Change the query so that it includes that column (whether you show it or not in your form/report) and it should work fine.

  3. #3
    ano is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Nov 2023
    Posts
    62
    bnk is part of table but not needed for the query. and certainly not needed as filter because the banks are summarized.
    why order by is generated is also not clear becuse the qry works perfect jus want sum and cross combined because cross cannot calculate the diff between 2 line

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

Similar Threads

  1. Replies: 5
    Last Post: 03-03-2023, 08:10 AM
  2. Replies: 5
    Last Post: 08-24-2017, 06:51 PM
  3. Parameter value popup-why?
    By gg80 in forum General Chat
    Replies: 5
    Last Post: 05-30-2016, 04:07 PM
  4. parameter popup
    By slimjen in forum Forms
    Replies: 1
    Last Post: 04-14-2015, 12:34 PM
  5. Replies: 10
    Last Post: 09-27-2010, 08:06 PM

Tags for this Thread

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