Year in Query

R

Robert Sykes

Hello, I'm working on a membership database for a fitness club, I need to
design a query for all the members joined in a certain month of the year, I
currently have it set to pull values from unbound field on a form, this is
the expression that I have:

WHERE (((Year([Start]))=[Forms]![frm_monthly_config]![Year]) AND
((Month([Start]))=[Forms]![frm_monthly_config]![Month]));

How would I alter the expression so that it uses the current year instead of
having to enter it manually on the form.

Thanks in advance.

--
Notice of Confidentiality:
This transmission contains information that may be confidential and that may
also be privileged. Unless you are the intended recipient of the message
(or authorized to receive it for the intended recipient), you may not copy,
forward, or otherwise use it, or disclose its contents to anyone else. If
you have received this transmission in error, please notify us immediately
and delete it from your system.
 
R

Rick B

WHERE (((Year([Start]))=(Year(Now())) AND
((Month([Start]))=[Forms]![frm_monthly_config]![Month]));
 
J

Jeff Conrad

Slight correction:

WHERE (((Year([Start]))=Year(Now())) AND
((Month([Start]))=[Forms]![frm_monthly_config]![Month]));

--
Jeff Conrad
Access Junkie
Bend, Oregon

Rick B said:
WHERE (((Year([Start]))=(Year(Now())) AND
((Month([Start]))=[Forms]![frm_monthly_config]![Month]));

Robert Sykes said:
Hello, I'm working on a membership database for a fitness club, I need to
design a query for all the members joined in a certain month of the year, I
currently have it set to pull values from unbound field on a form, this is
the expression that I have:

WHERE (((Year([Start]))=[Forms]![frm_monthly_config]![Year]) AND
((Month([Start]))=[Forms]![frm_monthly_config]![Month]));

How would I alter the expression so that it uses the current year instead of
having to enter it manually on the form.

Thanks in advance.

--
Notice of Confidentiality:
This transmission contains information that may be confidential and that may
also be privileged. Unless you are the intended recipient of the message
(or authorized to receive it for the intended recipient), you may not copy,
forward, or otherwise use it, or disclose its contents to anyone else. If
you have received this transmission in error, please notify us immediately
and delete it from your system.
 

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