473,396 Members | 2,011 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,396 software developers and data experts.

Month Query restrict records

HI i want to create a month query that restricts the records by a month given that is inputed by a user from a form. There is an attribute in the relation called date which should only match the month date given by the user. What clause would i enter to get this restriction? i believe it has somthing to do with a date function? but im still unfamilar with it.

I would also like to know which what is the best way to ask the user for a month in the form. My approach is to have numerical values in a list box or is ther a better way to do this?

Table Schema:
Date
PatientNo
ProviderNo
Nov 6 '07 #1
3 1584
Rabbit
12,516 Expert Mod 8TB
I usually use a combo box but a listbox works as well. As for the criteria, you don't care about the year? Just use the Month() function then to return the month value of a Date.
Nov 7 '07 #2
I usually use a combo box but a listbox works as well. As for the criteria, you don't care about the year? Just use the Month() function then to return the month value of a Date.
Yer i will need year as wel do get each month of each year.
Just wonderin how would you do that in a query?
Somthing like
Expand|Select|Wrap|Line Numbers
  1. SELECT PatientAccount.Date
  2. FROM PatientAccount; 
  3. WHERE PatientAccount.Date = [forms]![txtDateForm]![Year(),Month()] 
Not sure if thats right
Nov 8 '07 #3
Rabbit
12,516 Expert Mod 8TB
You're looking for:
Expand|Select|Wrap|Line Numbers
  1. Year(PatientAccount.Date) = [forms]![txtDateForm]![txtYear] AND Month(PatientAccount.Date) = [forms]![txtDateForm]![txtMonth]
  2.  
Nov 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ken Fine | last post by:
Using ASP, I want to display a series of records grouped by nested years and months, e.g.: 2004 December Record1 Record2 Record3 November Record4
3
by: Clive Moss | last post by:
Anyone able to help? I want to update a specified number of records that match a criteria. If I use an update query it alters all the records that match - I need to alter only a variable number....
1
by: Ben | last post by:
Hi I am currently building a database in Access 97 and have a (quite easy) question. I want to produce a query / report that will bring out all the people in the database that have a birthday...
1
by: Colm O'Brien | last post by:
I have a field called year end month where records hold the month financial year end for accounts is stored. i need to query the data base and return all records where year end month is less...
1
by: Wayfarer | last post by:
I've built a report using a aggregate query that is grouped by Month + Year, Program and Name. When I feed the date ranges as query parameters, it will very properly print out a report that shows...
10
by: Jim | last post by:
I'm sure this has been asked before but I can't find any postings. I have a table that has weekly inspections for multiple buildings. What I need to do is break these down by the week of the...
22
by: Stan | last post by:
I am working with Access 2003 on a computer running XP. I am new at using Access. I have a Db with a date field stored as mm/dd/yyyy. I need a Query that will prompt for the month, ie. 6 for...
4
by: perryclisbee via AccessMonster.com | last post by:
I have dates of service for several people that range all over each month. ie: patient had dates of service of: 7/3/2006, 7/24/2006 and 7/25/2006. I need to create a new field via a query that...
6
by: ndeeley | last post by:
Hi, I'm trying to extract records for this month and output the count as a figure. I also want to do this for last month. Obviously this will be dynamic so the months update themselves with the...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.