By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,483 Members | 1,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,483 IT Pros & Developers. It's quick & easy.

Choose Month & Year when giving report criteria

P: n/a
Hello,

I generate invoices for my customers evry month. I want to keep a form which
will allow the user to select the Month and Year through a combo and thus
generate reports based on the month selected. Also, please let me know how
I can keep a copy of invoices which I generate for future reference.
Awaiting eagerly for your replies

--
'With Thanks'
Burg
Dec 24 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
How is the date stored in your table? If your date field is
mm/dd/yyyy, then you can create a query that calculates the month and
year: Month(datefield) & "/" & year(datefield). Or else you can
create a field month and another year in the table then filter on that
accordingly.

Dec 24 '05 #2

P: n/a
mm/dd/yyyy is a format. It determines how a date is displayed. It has
nothing to do with how a date is stored in a field, nor in memory.
Dates are stored as eight bytes which are interpreted in a way
analogous to the way Doubles are interpreted, with the integer values
representing days since Larry Linson's date of birth (Dec 30, 1899) and
fractional amounts representing hours, minutes and seconds.
Month(Date) and Year(Date) are not dependent on date format; they
should "work" on any date.

Dec 24 '05 #3

P: n/a

"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11********************@g47g2000cwa.googlegrou ps.com...
mm/dd/yyyy is a format. It determines how a date is displayed. It has
nothing to do with how a date is stored in a field, nor in memory.
Dates are stored as eight bytes which are interpreted in a way
analogous to the way Doubles are interpreted, with the integer values
representing days since Larry Linson's date of birth (Dec 30, 1899) and

ROFL!

fractional amounts representing hours, minutes and seconds.
Month(Date) and Year(Date) are not dependent on date format; they
should "work" on any date.


Dec 25 '05 #4

P: n/a
That was my real point. If he is storing a date field or if he were
doing two fields Month, Year.

Dec 25 '05 #5

P: n/a

Lyle Fairfield wrote:
mm/dd/yyyy is a format. It determines how a date is displayed. It has
nothing to do with how a date is stored in a field, nor in memory.
Dates are stored as eight bytes which are interpreted in a way
analogous to the way Doubles are interpreted, with the integer values
representing days since Larry Linson's date of birth (Dec 30, 1899) and
fractional amounts representing hours, minutes and seconds.
Month(Date) and Year(Date) are not dependent on date format; they
should "work" on any date.


You are correct. The format is not what I really meant to refer to.
To answer the orignal question, I was asking if there was a date field
in the table. If so, write a query to calculate the month and year.
Of course, you could also calculate the last day of the month of any
field. To me, that makes it cleaner because you only have one field to
contend with. Furthermore, I'd store that calculation of that field in
the table so I may refer to it at any time.

The orignal question does not indicate if there is a month field and a
year field or if there is just a date field to calculate the month and
year of said field.

Dec 25 '05 #6

P: n/a
"Lyle Fairfield" <ly***********@aim.com> wrote
mm/dd/yyyy is a format. It determines how a date is displayed. It has
nothing to do with how a date is stored in a field, nor in memory.
Dates are stored as eight bytes which are interpreted in a way
analogous to the way Doubles are interpreted, with the integer values
representing days since Larry Linson's date of birth (Dec 30, 1899) and
fractional amounts representing hours, minutes and seconds.
Month(Date) and Year(Date) are not dependent on date format; they
should "work" on any date.


Whippersnapper! Now you've let out the secret of why they chose that as the
base date.

<GRIN>
Dec 26 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.