Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / May 2008

Tip: Looking for answers? Try searching our database.

Cell 1 = row 1 balance minus row 2 balance

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dolphinv4 - 29 May 2008 01:51 GMT
Hi,

I have a table as below, and I want to create a new column NEW:

Date        A/c     Balance    NEW
1/1/08     ABC    100.00     200.00 (300-100)        
1/2/08     DEF     300.00    -100.00 (200-300)
1/3/08     XYZ     200.00    200.00  (0-200)

ie, next row balance minus last row balance. How do i do that?

Thanks,
Dolphin
scubadiver - 29 May 2008 09:02 GMT
SELECT E164src.LiveMonth, E164src.Total AS New, (SELECT Max([Total])
FROM E164src AS temp
WHERE temp.monthID=E164src.monthID+1) AS Old, [new]-[old] as diff
FROM E164src

will do the following:

ID            LiveMonth    New    Old    diff
1             Aug 06    1    9               8
2             Sep 06    9    5              -4
3             Nov 06    5       

> Hi,
>
[quoted text clipped - 9 lines]
> Thanks,
> Dolphin
scubadiver - 29 May 2008 09:05 GMT
Sorry,

should be

[old]-[new] as diff

> Hi,
>
[quoted text clipped - 9 lines]
> Thanks,
> Dolphin
Jeff Boyce - 29 May 2008 12:36 GMT
The subject line you provide appears to presume you are working in Excel,
not in Access.

Signature

Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

> Hi,
>
[quoted text clipped - 9 lines]
> Thanks,
> Dolphin
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.