Select Query problem

  • Thread starter Thread starter AccessNubee
  • Start date Start date
A

AccessNubee

I've created a select query in Access 2003 that gives me a count of all new
members after Apr 08 based on the MembershipDate. With the assistance of the
discussion group I was successful in obtaining that information. Now I have
created a report based on that query. But instead of only the new members
showing up on the report all the members names are showing up. How do I get
the query and the report to only show new members?

My Field Names are:
ClientID
MembershipDate
First Name
Last Name
New Members (which is the count)
 
Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here.
 
Here it is:

SELECT [Active NORC clients].ClientID, [Active NORC clients].MembershipDate,
[Active NORC clients].[First Name], [Active NORC clients].[Last Name],
DCount("*","Active NORC clients","MembershipDate >= #04/01/2008# ") AS [New
Members]
FROM [Active NORC clients]
WHERE ((([Active NORC clients].MembershipDate) Like "*") AND (([Active NORC
clients].[Last Name]) Like "*"));
 
Both parts of the Where clause (AKA the Criteria) are Like statements with
nothing but wildcards (*). It's saying "give me all the records". You need
something in the criteria that says what records that you want returned like
#1/1/2008#
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

AccessNubee said:
Here it is:

SELECT [Active NORC clients].ClientID, [Active NORC clients].MembershipDate,
[Active NORC clients].[First Name], [Active NORC clients].[Last Name],
DCount("*","Active NORC clients","MembershipDate >= #04/01/2008# ") AS [New
Members]
FROM [Active NORC clients]
WHERE ((([Active NORC clients].MembershipDate) Like "*") AND (([Active NORC
clients].[Last Name]) Like "*"));


Jerry Whittle said:
Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here.
 
Thanks Jerry. It worked perfectly.

Jerry Whittle said:
Both parts of the Where clause (AKA the Criteria) are Like statements with
nothing but wildcards (*). It's saying "give me all the records". You need
something in the criteria that says what records that you want returned like
#1/1/2008#
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

AccessNubee said:
Here it is:

SELECT [Active NORC clients].ClientID, [Active NORC clients].MembershipDate,
[Active NORC clients].[First Name], [Active NORC clients].[Last Name],
DCount("*","Active NORC clients","MembershipDate >= #04/01/2008# ") AS [New
Members]
FROM [Active NORC clients]
WHERE ((([Active NORC clients].MembershipDate) Like "*") AND (([Active NORC
clients].[Last Name]) Like "*"));


Jerry Whittle said:
Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


:

I've created a select query in Access 2003 that gives me a count of all new
members after Apr 08 based on the MembershipDate. With the assistance of the
discussion group I was successful in obtaining that information. Now I have
created a report based on that query. But instead of only the new members
showing up on the report all the members names are showing up. How do I get
the query and the report to only show new members?

My Field Names are:
ClientID
MembershipDate
First Name
Last Name
New Members (which is the count)
 
Back
Top