A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Record Count



 
 
Thread Tools Display Modes
  #1  
Old July 3rd, 2008, 11:36 PM posted to microsoft.public.access.queries
Kay
external usenet poster
 
Posts: 274
Default Record Count

This is a field in my query

Field Eligibilty Date: DateAdd("m",7,[Start Date])
Table
Total Expression
Sort
Show Yes
Criteria
Format mm/yy

that returns the following example correctly:

Start Date Eligibilty Date
01/01/2008 07/08


But what I dont know how to set the criteria to pull only the current months
records of eligibilty. I have tried adding two additional fields that looked
like below,

Field month([eligibilty date])
year([eligibilty date])
Table
Total Expression
Expression
Sort
Show Yes Yes
Criteria Month(Now())
Year(Now())

However all I get is a prompt to enter the paremater value of "eligibilty
date"

My ultimate goal is to have a form that displays a count of how many records
contain the current mm/yy in the "elgibilty date" field.

Anyone have any ideas?

Thanks in advance

Kay
  #2  
Old July 3rd, 2008, 11:46 PM posted to microsoft.public.access.queries
Kay
external usenet poster
 
Posts: 274
Default Record Count

Oh my... the formatting on my posting looks horrid and is unreadable...I am
so sorry...

Lets try that again.

"Kay" wrote:

This is a field in my query

Field Eligibilty Date: DateAdd("m",7,[Start Date])
Table
Total Expression
Sort
Show Yes
Criteria
Format mm/yy

that returns the following example correctly:

Start Date Eligibilty Date
01/01/2008 07/08

But what I dont know how to set the criteria to pull only the current months
of eligibilty. I have tried adding two additional fields that looked
like below,

Field month([eligibilty date])
Table
Total Expression
Show Yes
Criteria Month(Now())

Field Year([eligibilty date])
Table
Total Expression
Show Yes
Criteria Year(Now())



However all I get is a prompt to enter the paremater value of "eligibilty
"date"

My ultimate goal is to have a form that displays a count of how many records
contain the current mm/yy in the "elgibilty date" field.

Anyone have any ideas?

Thanks in advance

Kay
  #3  
Old July 4th, 2008, 12:19 AM posted to microsoft.public.access.queries
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Record Count

You need to repeat the original expression in the two new expressions:

Field month(DateAdd("m",7,[Start Date]))
Table
Total Expression
Show Yes
Criteria Month(Now())

Field Year(DateAdd("m",7,[Start Date]))
Table
Total Expression
Show Yes
Criteria Year(Now())

--

Ken Snell
MS ACCESS MVP



"Kay" wrote in message
...
Oh my... the formatting on my posting looks horrid and is unreadable...I
am
so sorry...

Lets try that again.

"Kay" wrote:

This is a field in my query

Field Eligibilty Date: DateAdd("m",7,[Start Date])
Table
Total Expression
Sort
Show Yes
Criteria
Format mm/yy

that returns the following example correctly:

Start Date Eligibilty Date
01/01/2008 07/08

But what I dont know how to set the criteria to pull only the current
months
of eligibilty. I have tried adding two additional fields that looked
like below,

Field month([eligibilty date])
Table
Total Expression
Show Yes
Criteria Month(Now())

Field Year([eligibilty date])
Table
Total Expression
Show Yes
Criteria Year(Now())



However all I get is a prompt to enter the paremater value of "eligibilty
"date"

My ultimate goal is to have a form that displays a count of how many
records
contain the current mm/yy in the "elgibilty date" field.

Anyone have any ideas?

Thanks in advance

Kay



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.