By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,483 Members | 1,464 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,483 IT Pros & Developers. It's quick & easy.

Partial User Value in a Query

P: 10
Hello there,

I'm guessing my title is a little confusing so i'll clarify

I currently have a query that is referring to information in the Appointments table, and the relating field is AppointmentDate.

Currently the format is dd/mm/yyyy and I would like the query to display all appointments in December

When the Box prompts I've tried to enter #/12/# and */12/* but neither seem to work.

I only have [Month] in the criteria field at the moment, just to enable a pop up for data entry, so any helpw ould be appreciated
Jan 8 '08 #1
Share this Question
Share on Google+
7 Replies


Rabbit
Expert Mod 10K+
P: 12,315
Use Month(AppointmentDate) = 12
Jan 9 '08 #2

P: 10
Appreciate the Help Rabbit, but unfortunately I wasn't clear of My intention.

I want the query to use the month the user enters, rather than statically being December.

so instead of writing "between 1/1/2007 and 31/12/2007" they just have to enter "December" or "12", catch my drift?
Jan 9 '08 #3

Rabbit
Expert Mod 10K+
P: 12,315
Expand|Select|Wrap|Line Numbers
  1. Month(AppointmentDate) BETWEEN 1 AND [Enter Month Number] AND Year(AppointmentDate) = 2007
Jan 9 '08 #4

P: 10
Once again Rab, your a ray of sunshine in my access life.

One more thing :D anyway in the sql statement to make the 1 and enter month prompt the user to enter and then it inserts it into the statement? or am i being too ambitious
Jan 9 '08 #5

Rabbit
Expert Mod 10K+
P: 12,315
I'm not quite sure what you mean. Are you talking about turning the 1 into a parameter as well?
Expand|Select|Wrap|Line Numbers
  1. Month(AppointmentDate) BETWEEN [Enter Start Month Number] AND [Enter End Month Number] AND Year(AppointmentDate) = 2007
Jan 9 '08 #6

P: 10
It's odd how you always overlook the simplest of things. Once again Rabbit you helped me out. Much Appreciated Amigo :D
Jan 12 '08 #7

Rabbit
Expert Mod 10K+
P: 12,315
Not a problem, good luck.
Jan 12 '08 #8

Post your reply

Sign in to post your reply or Sign up for a free account.