Results 1 to 4 of 4
  1. #1
    Altaful Haq is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2014
    Location
    Swat, KPK, Pakistan
    Posts
    22

    Need help in Query

    As there is any posibilities that we can write the query like
    "Match the field X of a form with the X field of the table with the last records of one Customer having multiple records."
    Help pleas.
    Last edited by June7; 02-18-2014 at 11:48 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You want to find a value from the most recent record for a specific customer? Yes, that can be done. It is tricky but possible. Need more info. Provide example of table structure and data.
    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.

  3. #3
    Altaful Haq is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2014
    Location
    Swat, KPK, Pakistan
    Posts
    22
    CustomerID(FK) BalanceID(PK) Oldbalance NewBalance NetBalance Payment RemainBalance
    ...........1........ .......1.......... .....50$..... .....100$.... ......150$... ..140$.. ........10$.....
    ...........1........ .......2.......... .....10$..... .....50$.... ........60$... ..60$.. ........0$.....

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You are saving balances into table? Saving calculated data, especially aggregate data, is usually a bad idea.

    Here is one way to get the value from another record http://allenbrowne.com/subquery-01.html#AnotherRecord

    You want running balance. That is not easy in query or form. Common topic.

    http://support.microsoft.com/kb/290136
    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.

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