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 / Forms / October 2005

Tip: Looking for answers? Try searching our database.

compare datas in a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
corfiotis - 12 Oct 2005 10:37 GMT
Can anyone help me how to indroduce datas in a form for a period of time and
then
compare them with datas from the same period previous year?
For example

Sum of money from 1/1/5 till  30/4/5
        with
Sum of money from 1/1/4 till  30/4/4
John Vinson - 14 Oct 2005 00:10 GMT
>Can anyone help me how to indroduce datas in a form for a period of time and
>then
[quoted text clipped - 4 lines]
>         with
>Sum of money from 1/1/4 till  30/4/4

Could you explain how the data is stored in your table, and what you
want to do? I do not understand the question.

You can use a Query with a criterion of

>= DateSerial(Year(Date()), 1, 1) AND <= Date()

to get all records between the start of the year and today's date, and
another query with

>= DateSerial(Year(Date()) - 1, 1, 1) AND <= DateSerial(Year(Date()) - 1, Month(Date()), Day(Date())

to get the corresponding date range for the previous year. Perhaps you
could use two Subforms or two Subreports to compare the information.

                 John W. Vinson[MVP]    
corfiotis - 17 Oct 2005 08:17 GMT
Thank you very very much but perhaps it was my fault
the first day of the year it was in the example i want to calculate any
period i like.
Thank you

Ο χρήστης "John Vinson" έγγραψε:

> >Can anyone help me how to indroduce datas in a form for a period of time and
> >then
[quoted text clipped - 21 lines]
>
>                   John W. Vinson[MVP]    
Douglas J Steele - 17 Oct 2005 12:32 GMT
Note that John used

DateSerial(Year(Date()), 1, 1)

to represent the 1st of January for the current year. To get any arbitrary
date, you simply change what values you're passing to the DateSerial
function.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Thank you very very much but perhaps it was my fault
> the first day of the year it was in the example i want to calculate any
[quoted text clipped - 28 lines]
> >
> >                   John W. Vinson[MVP]
John Vinson - 17 Oct 2005 17:20 GMT
>Thank you very very much but perhaps it was my fault
>the first day of the year it was in the example i want to calculate any
>period i like.

Then use a criterion of

BETWEEN [Enter start date:] AND [Enter end date:]

You'll be prompted for the dates, and the query will total the values
within that date range.

                 John W. Vinson[MVP]    
 
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.