Percentage

J

Jessica

I need a formula that would calculate the percentage of clients who have been
in a homesless shelter less then than twelve months who have no more than two
placements settings.I Have the following fields in a query. DOE and # of
placements. Can someone help me
 
J

Jeff Boyce

Jessica

"How" depends on "what".

I don't have any idea what your data looks like.

At a minimum, please post the SQL statement of the query you are using now.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jerry Whittle

Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here.
 
J

Jessica

The formula is not working
Count([# of placements]) AS PlacementCount
FROM
WHERE (((DOE) Between Date() And Date()-365))
HAVING (((of placements]))>=2));
 
J

Jerry Whittle

Seems to be a bunch of problems or just typos in your SQL statement.

1. It doesn't mention a table after FROM

2. In the HAVING it's missing a [, and maybe having an extra (, in front of
the of (placements] .

2. In the Select you have [# of placements] but in the Having only [of
placements].

4. Date() can be a problem is there is a references problem. Press Ctrl + g
at the same time. In the Immediate window type the following and press Enter:

Debug.Print Date()

It should product today's date. If there's an error, you have a references
problem OR a typo.

Try running the following with the proper table and field names:

Count([# of placements]) AS PlacementCount
FROM TheTableName
WHERE [DOE] Between Date() And Date()-365
HAVING [# of placements]>=2;
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Jessica said:
The formula is not working
Count([# of placements]) AS PlacementCount
FROM
WHERE (((DOE) Between Date() And Date()-365))
HAVING (((of placements]))>=2));

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.
 
G

Guest

Jessica said:
The formula is not working
Count([# of placements]) AS PlacementCount
FROM
WHERE (((DOE) Between Date() And Date()-365))
HAVING (((of placements]))>=2));

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top