Results 1 to 2 of 2
  1. #1
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276

    Help Me Fix "Transaction Entry Is Duplicated With 2 Attachments"

    I am having problem with the following Querry
    If I insert 2 attachments the transaction duplicates. & balance amount is doubled

    example:

    Cust ID: 4 Account Title: BPL - Security Deposit
    ID Date G.P / Vou Description Qty Units Price Tax Rate Tax Amount Debit Credit Balance Remarks Attac
    1 31-Jan-14 Security Deposit 0 Kgs Rs. 0.00 0.00% Rs. 0.00 Rs. 1,000,000.00 Rs. 0.00 Rs. 1,000,000.00 Man Bank Cashiers Cheque Yes


    3752
    1 31-Jan-14 Security Deposit 0 Kgs Rs. 0.00 0.00% Rs. 0.00 Rs. 1,000,000.00 Rs. 0.00 Rs. 2,000,000.00 Man Bank Cashiers Cheque Yes





    SELECT Pchase.PurCompanyName, Pchase.PurTransId, Pchase.[Purchase Date], Pchase.[Purchase Description], Pchase.[Party Challan #], Pchase.[Invoice #], Pchase.[Purchase Qty], Pchase.[Purchase Price], Pchase.[Purchase Units], Company.CoId, Pchase.[Pur Seller], ([Payment Made]+[Mobile Deduction]) AS Dbt, Pchase.[Amount Returned], [Purchase Remarks] & " " & [D2Party] & " " & [SB] & " " & [PPMTTYP] & " " & [TrNo] & " " & [Cheque PO #] & " " AS Rem, IIf([Amount Returned]=0,([Purqty]*[Purchase Price]+[GST Amount]),[Amount Returned]) AS PurCredit, Pchase.[Pur Varification], Pchase.[Cheque PO #], [Purchase Description] & " " & [Salery Month] AS Des, IIf([Supplier Bank]="Nil",Null,[Supplier Bank]) AS SB, IIf([Payment Type]="Nil",Null,[Payment Type]) AS PPMTTYP, IIf([Delivered To Party]="Nil",Null,[Delivered To Party]) AS D2Party, Pchase.purattach, Pchase.[Mobile Deduction], Pchase.[Payment Made], IIf(IsNull([purattach].[FileData])," ","Yes") AS Patt, Company.[NIC No], Voucher.VoucherNo, [Party Challan #] & " " & [VoucherNo] AS GPVOU, IIf([Truck #]="Nil"," ",[Truck #]) AS TrNo, Company.CoAttach, Company.NICcopyFront, Company.NICcopyBack, Pchase.[GST Rate], Pchase.[GST Amount], Pchase.[Total Amount], Pchase.GSTR, Pchase.Purqty, Pchase.[Purchase Cash Qty], Pchase.[Purchase Sales Tax]
    FROM Company INNER JOIN (Pchase LEFT JOIN Voucher ON Pchase.PurTransId = Voucher.[Vou ID]) ON Company.ComapnyName = Pchase.PurCompanyName
    ORDER BY Pchase.PurTransId, Pchase.[Purchase Date];




    I have no idea how to fix this issue
    need urgent help

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Pchase and Voucher have a 1 to many relationship?

    Probably need to first summarize the many side records with aggregate query then use that query instead of table in the above.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 9
    Last Post: 08-19-2013, 03:00 PM
  2. Replies: 5
    Last Post: 02-05-2013, 10:57 PM
  3. Identify "duplicated" rows
    By mkallover in forum Queries
    Replies: 7
    Last Post: 01-15-2013, 12:45 PM
  4. Replies: 7
    Last Post: 01-29-2012, 07:44 AM
  5. Replies: 1
    Last Post: 03-30-2011, 06:16 PM

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