Query Question

  • Thread starter Thread starter Lost in Virginia
  • Start date Start date
L

Lost in Virginia

I did not see my other post so I am sorry for asking the same question again.
I have created a standard table, Name, Birthday, Date of Hire etc etc. I
would like to create a query for each month for birthdays only. I am having
a hard time trying to figure out what function I need to use to only display
each month. Ie January only, february Only and so on.
 
Do you want to only display birthdays for the current month,
next month, or are you looking to display all the birthdays
grouped by month? Or something else?
 
I am new at this and I may be asking the wrong question. Here is what I want
to do. I want to create a query called Birthday January, Birthday February
Birthday March. ETC ETC. So when I open the January Query it only displays
the Birthday for January.

Thanks
 
It would be simpler to create a query that prompts the user for
the month, rather than creating 12 separate queries.

Create a query of your table including Name, BirthDate and
any other fields you want to see. Add another column to your
query using the following;

Format([BirthDate], "mmmm")

(replace [BirthDate] with your actual field name)

Uncheck the show box for this column and in the criteria row put;

[Enter A Month]

When the query runs, the user will be promted for the month. If
they enter January, only January birthdays will be returned.

On another note, if you really have a field in your table called Name
you should change it for a couple of reasons. First, Name is a reserved
word in Access. Second, a person's name should be separated into
FirstName an LastName (at a minimum). For more on reserved words
see Allen Browne's page at;

http://www.allenbrowne.com/AppIssueBadWord.html
 
I like this format and it seems to work fine. But how would I do it if I
wanted to do 12 different Queries?

Thank You

Beetle said:
It would be simpler to create a query that prompts the user for
the month, rather than creating 12 separate queries.

Create a query of your table including Name, BirthDate and
any other fields you want to see. Add another column to your
query using the following;

Format([BirthDate], "mmmm")

(replace [BirthDate] with your actual field name)

Uncheck the show box for this column and in the criteria row put;

[Enter A Month]

When the query runs, the user will be promted for the month. If
they enter January, only January birthdays will be returned.

On another note, if you really have a field in your table called Name
you should change it for a couple of reasons. First, Name is a reserved
word in Access. Second, a person's name should be separated into
FirstName an LastName (at a minimum). For more on reserved words
see Allen Browne's page at;

http://www.allenbrowne.com/AppIssueBadWord.html

--
_________

Sean Bailey


Lost in Virginia said:
I am new at this and I may be asking the wrong question. Here is what I want
to do. I want to create a query called Birthday January, Birthday February
Birthday March. ETC ETC. So when I open the January Query it only displays
the Birthday for January.

Thanks
 
You would create the queries in the same manner,
but in the criteria row you would put "January" or
"February", etc. (including the quotes).
--
_________

Sean Bailey


Lost in Virginia said:
I like this format and it seems to work fine. But how would I do it if I
wanted to do 12 different Queries?

Thank You

Beetle said:
It would be simpler to create a query that prompts the user for
the month, rather than creating 12 separate queries.

Create a query of your table including Name, BirthDate and
any other fields you want to see. Add another column to your
query using the following;

Format([BirthDate], "mmmm")

(replace [BirthDate] with your actual field name)

Uncheck the show box for this column and in the criteria row put;

[Enter A Month]

When the query runs, the user will be promted for the month. If
they enter January, only January birthdays will be returned.

On another note, if you really have a field in your table called Name
you should change it for a couple of reasons. First, Name is a reserved
word in Access. Second, a person's name should be separated into
FirstName an LastName (at a minimum). For more on reserved words
see Allen Browne's page at;

http://www.allenbrowne.com/AppIssueBadWord.html

--
_________

Sean Bailey


Lost in Virginia said:
I am new at this and I may be asking the wrong question. Here is what I want
to do. I want to create a query called Birthday January, Birthday February
Birthday March. ETC ETC. So when I open the January Query it only displays
the Birthday for January.

Thanks

:

Do you want to only display birthdays for the current month,
next month, or are you looking to display all the birthdays
grouped by month? Or something else?
--
_________

Sean Bailey


:

I did not see my other post so I am sorry for asking the same question again.
I have created a standard table, Name, Birthday, Date of Hire etc etc. I
would like to create a query for each month for birthdays only. I am having
a hard time trying to figure out what function I need to use to only display
each month. Ie January only, february Only and so on.
 

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

Similar Threads

Birth date 1
Filter in A report 1
Access query 1
Birthday format 11
Access 2007 and Dates 1
Querying question with regards to birth date 6
Access 2007 and Dates 1
Query design 2

Back
Top