473,395 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Report for Current Month.

Hey all,

I did some searching and can't seem to find what Im looking to do.

I have a time sheet DB and would like to make a report to show all of
the records for the current month.

I've played with some queries but can't seem to get it to work. Any
ideas?

Thanks for all of your help!

Jan 2 '07 #1
5 3191
As long as the date in the DB is defined as a date then

In a select query (to start with) as criteria put:

Year(date()) = year(Timesheetdatefieldname) and month(date()) =
month(timesheetdatefieldname)

Ron

Jan 2 '07 #2
Since im still a wee newb, where do I put these lines?

Thanks Ron!

Ron2006 wrote:
As long as the date in the DB is defined as a date then

In a select query (to start with) as criteria put:

Year(date()) = year(Timesheetdatefieldname) and month(date()) =
month(timesheetdatefieldname)

Ron
Jan 2 '07 #3
Open the base query for you report in design mode and put the line of
code in the criteria line under the "Timesheetdatefieldname". Use the
build option (right click on the criteria line) and create the criteria
in the window it shows. This is so you can see how it ends up modifying
the field name.

After you close the query and open it again in design mode you will see
that Access has added two columns to your query with the criteria for
each spelled out. Once you see how it does it you could use the same
technique (of splitting the tests) in other queries.

Ron

Jan 2 '07 #4
Ron,

I did all that and got the same results when I went back into the
design view. When I double click the query to run it, I get a Data type
mismatch error. Any Ideas?

Ron2006 wrote:
Open the base query for you report in design mode and put the line of
code in the criteria line under the "Timesheetdatefieldname". Use the
build option (right click on the criteria line) and create the criteria
in the window it shows. This is so you can see how it ends up modifying
the field name.

After you close the query and open it again in design mode you will see
that Access has added two columns to your query with the criteria for
each spelled out. Once you see how it does it you could use the same
technique (of splitting the tests) in other queries.

Ron
Jan 2 '07 #5
"radink" <ra*****@gmail.comwrote in message
news:11**********************@s34g2000cwa.googlegr oups.com...
Hey all,

I did some searching and can't seem to find what Im looking to do.

I have a time sheet DB and would like to make a report to show all of
the records for the current month.

I've played with some queries but can't seem to get it to work. Any
ideas?
It is best not to apply criteria to an expression unless that is the only way to
do it.

Post the SQL of your current query or at least the name of the date field you
are trying to filter on.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jan 2 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: matt | last post by:
(apologies for the cross-post.. im not normally in the habit of such things) SHORT VERSION (for smart people in a hurry): I need some way to programmatically cause the update of calculated...
0
by: M | last post by:
Hi all, I am having problems figuring out the best way to query my database in order to create a report. Perhaps someone can help me? Background -- Consider a table with the following...
1
by: Pea | last post by:
Hello, I have an Access report that works well. I need to add a prompt for the user to input the month of data that the report will show. I used an InputBox and instead of showing that month in...
3
by: Alec | last post by:
Hi All, I want to create a report listing all the people's birthdays that are in the current month, in other words, if I clicked to open the report today, it would show everyone who's birthday...
0
by: Rahul Chatterjee | last post by:
Hello All I have designed a dotnet application using VB which basically takes a selection and passes value to a crystal report which in turn passes the value to a Stored procedure. After the...
1
by: Andy_Khosravi | last post by:
I'm having trouble building a query to gather the information I need from a table. I need to be able to assemble an inventory report that displays receipts, output, and running inventory from a...
9
by: rinmanb70 | last post by:
I have a table of transactions, some with past dates, some dated the current date, and some dated in the near future. On a report, I'm looking for a way to get four different sums using the...
12
by: Orchid | last post by:
Hello all, I have different version of reports which used for different months. For example, I am using report version 1 up to September, but we have some design changes on the report for October,...
2
by: Bob | last post by:
I've searched this group and have not found any posts since 2001, so I'm hoping that now there may be a better way. I have a need to generate a report that looks like a outlook monthly calendar...
3
by: weirdguy | last post by:
Hello, I need advise on how to solve this scenario. I am not sure whether I should use any Report Application such as Crystal Report or I can just simply use datagridview. My scenario: In a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.