Re: Month Query



I dont know if this is me that can't get this to work or what. I TRIED what
you told me, over and over. I dont need YEAR, all i need is MONTH. I have
another field for YEAR. I tried to change the following so many times:

1) Table Design, Scheduled Month field to "Date/Time", under it, there is a
"format" i put "mmmm" or "mmm" neither worked. There is option that I can
select, but it is always with month and year, i dont need that, I only need
MONTH, that's all.

2) On the query designed, I changed the field "format" to "mmmm" or "mmm",
neither worked. And I also copy and paste the expressions that you two
provided. Still no luck.

3) I changed my "scheduled month" column on my form to "Date/Time", format
"mmmm" or "mmm", it doesnt work.

And it keeps giving me the error message of it is invalid, and too complex.
I really want this to work as Date, but I can't make it work.


Choose([Scheduled Month], "January", "February", "March", <etc through
December) <<<<<<<<Where do I put this???

John Vinson wrote:
I tried with the codes that you provided and just couldn't figure out. But I
tried using my Scheduled Month format as "number" in the table design. And
[quoted text clipped - 3 lines]
using the "number" format. Is there any way at all? I just can't get them
to work by using the tips you two provided.

Sure. You can use an integer 1-12 field [Scheduled Month] and use a
function:

Choose([Scheduled Month], "January", "February", "March", <etc through
December)

You DIDN'T use the tips I provided. I suggested changing the datatype
of the field to Date/Time. Did you try that?

I am also thinking of doing it by formating

Don't confuse a field's DATA TYPE with its FORMAT. They are two quite
separate (somewhat interdependent) properties. A Format merely
controls how a value is displayed; a datatype controls what can be
actually stored in the field.

the Scheduled Month field as
number format, and then use combo boxes in the forms with 2 columns, one
number, and another month name, and on the report side by using a formula of
=scheduled month? WIll this work? Will it mess up some calculations in the
future?

Yes. What year is 4 in?

Date values ARE DATES. January follows December (if it's January 2007
and December 2006); 12 follows 11 and precedes 1. This is true of
dates; it is NOT true of numbers. If you're working with date data -
why on Earth don't you want to use a date datatype!?

Any easy way for me to do this month query, i am not an expert in access and
is getting very frustrated with this month query. If possible, is there any
possible access samples with just Month Query. I checked out the Allen
Browne, but couldn't figure out at all with that code.

It's not working because you are insisting on using THE WRONG
DATATYPE.

John W. Vinson[MVP]

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200611/1

.



Relevant Pages

  • Re: Union query
    ... I replaced the union statements with the or operator. ... back to the short date format. ... >>The datatype of the document year field is number. ... WHY the monstrous UNION query, when a simple single select query ...
    (microsoft.public.access.queries)
  • Date format - ADO query Access to Excel
    ... datatype, but when I import it, it displays as General in xl. ... manually change the column format to a Date format, but I want to do it with ... The recordset may only have 4-5 fields out of 40 in the Access Table. ... say in my WHERE clause to make this part of the query? ...
    (microsoft.public.excel.programming)
  • FormatPercent Function - Access 2003
    ... I have a query with one of the columns using the FormatPercent function. ... When I output this to an Excel spreadsheet, the percentage value shows up as ... text datatype to number datatype before a user can output the query to an ... format so sorting would be correct. ...
    (microsoft.public.access.queries)
  • FormatPercent Function - Access 2003
    ... I have a query with one of the columns using the FormatPercent function. ... When I output this to an Excel spreadsheet, the percentage value shows up as ... text datatype to number datatype before a user can output the query to an ... format so sorting would be correct. ...
    (microsoft.public.access.queries)
  • SQL Format "?"
    ... I have a query: ... FROM [BROKER 3]; ... I dont want to format as a percent, I want it to go into the table ...
    (comp.databases.ms-access)