[mso] Re: Access: Converting Date To Year For Parameter Look Ups
- From: "Jim Pettit" <j_e_pettit@xxxxxxxxxxx>
- To: <mso@xxxxxxxxxxxxx>
- Date: Tue, 24 Feb 2004 08:18:15 -0800
Cathy--
If I understand you correctly, you're trying to use the Format function
n the date field to populate the drop down. If so, you should be using
the DatePart function as follows:
SELECT DISTINCT DatePart("yyyy",[ClassCompleted]) AS [Year]
FROM tblClassInformation
GROUP BY DatePart("yyyy",[ClassCompleted])
HAVING (((DatePart("yyyy",[ClassCompleted])) Is Not Null))
ORDER BY DatePart("yyyy",[ClassCompleted]);
Hope this helps...
--Jim
-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On
Behalf Of Cathy.Evans@xxxxxxxxx
Sent: Tuesday, February 24, 2004 8:10 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Access: Converting Date To Year For Parameter Look
Ups
Jim, here is the SQL for the query. The date field is formatted as
yyyy. Hope this helps, thanks.
SELECT DISTINCT tblClassInformation.ClassCompleted AS [Year] FROM
tblClassInformation GROUP BY tblClassInformation.ClassCompleted
HAVING (((tblClassInformation.ClassCompleted) Is Not Null)) ORDER BY
tblClassInformation.ClassCompleted;
"Jim Pettit"
<j_e_pettit@hotmail To: <mso@xxxxxxxxxxxxx>
.com>
Sent by: cc:
mso-bounce@freelist
s.org Subject: [mso] Re:
Access: Converting Date To Year For
02/24/2004 10:51 AM Parameter Look Ups
Please respond to
mso
....
Cathy--
Can you please forward the query you actually use so we can take a look
at it?
--Jim
-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On
Behalf Of Cathy.Evans@xxxxxxxxx
Sent: Tuesday, February 24, 2004 6:36 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Access: Converting Date To Year For Parameter Look Ups
I have a table date field that is capturing day, month and year. For
certain reporting, I am needing to look at that date in the format of
year. I can format it as yyyy and get a result of 2001, 2002, etc., but
when I try to make a drop down list of just years so I can open a report
with only classes attended during the year chosen, I am getting an error
telling me my field type is not valid. My parameter drop down box is
tied to this one date field only, formatted as yyyy. In my query I
group the dates to return a particular year, and am grouping and asking
for unique values but I still get a record for each full date entered
though it is only returning the year. So I may have 60 records, but only
3 years showing in the list. There are no other fields in this query
except for year. I was hoping to get a grouped list of only one listing
per year so the user would have a drop down option to filter the report.
Am I looking at this all wrong?
The user enters the class completed date against one of several classes.
The attendee can attend multiple classes, and certain classes are up for
renewal each year, others every 2 years. The user wants to be able to
pull reports to see who is up for renewal, and to look at an entire year
and see everything everyone attended for that year. What is the best way
I can accomplish this? There are 3 tables, one with complete attendee
information, name, address, etc. The 2nd is for class types, the 3rd is
to post the actual dates and choose the class type from drop down list
tied to table 2. Appreciate any help, thank you.
------------------------------------------------------------------------
-----------------------------
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential and/or
privileged material. If you are not the intended recipient
of this message you are hereby notified that any use, review,
retransmission, dissemination, distribution, reproduction or any action
taken in reliance upon this message is prohibited. If you
received this in error, please contact the sender and delete the
material from any computer. Any views expressed in this message are
those of the individual sender and may not necessarily reflect
the views of the company.
------------------------------------------------------------------------
-------------------------------
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx
or MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the
quotes) in the subject line.
Or, visit the group's homepage and use the dropdown menu. This will
also allow you to change your email settings to digest or vacation (no
mail). http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group,
send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an
invitation with instructions. Once you are a member of the files group,
you can go here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in
the subject line.
Or, visit the group's homepage and use the dropdown menu. This will also allow
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with
instructions. Once you are a member of the files group, you can go here to
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************
- References:
- [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- From: Cathy . Evans
Other related posts:
- » [mso] Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- » [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- [mso] Re: Access: Converting Date To Year For Parameter Look Ups
- From: Cathy . Evans