Re: Month only field problem
From: GI Smith (GISmith_at_discussions.microsoft.com)
Date: 12/28/04
- Next message: Sam: "Number rounding"
- Previous message: brentus_at_yahoo.com: "Re: Relate Records with Checkboxes"
- In reply to: John Vinson: "Re: Month only field problem"
- Next in thread: Duane Hookom: "Re: Month only field problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 28 Dec 2004 10:31:01 -0800
John,
Thanks for the suggestion. I think I will add a number cross-reference to
the existing table MonthName which is what I'm using to populate the Period
Start, Period End and Month Due fields. The reports are always due the same
month, same day so no year information is required, which is why I did not
use a date field to begin with. Originally I planned to set up the periods
(annual, quarterly, semi-annual etc) with a combo list, problem is some
reports are fiscal year, some calendar. I didn't want the end user to have
to deal with several different criteria so figured plugging in months would
be better in the long run.
Problem with the month field is - as a combo list it auto sorts the month
names alphabetically so assigning a number value should keep it in the proper
calendar order.
Thanks to everyone helping out. This support network is great for working
through the snags.
Suzanne
"John Vinson" wrote:
> On Mon, 27 Dec 2004 17:27:01 -0800, "GI Smith"
> <GISmith@discussions.microsoft.com> wrote:
>
> >Duane - Don't know if I can't see the forest for the trees or if I've been
> >looking at this too long.... I added a test field named StartMonth, set it up
> >as numeric data type in the table design window, under the General tab the
> >field size is long interger and Format is mmmm. When I attempt to input a
> >numeric number in field on the form I get an error. Should I just set up a
> >numerical field and format mmmm in the properties on the form?
>
> A format of mmmm is appropriate for a Date/Time field - but NOT for an
> integer field. A Date is stored as a number, a count of days and
> fractions of a day (times) since midnight, December 30, 1899... if the
> mmmm format were to work at all, 1 would be shown as December (since
> 1.0 is equivalent to #12/31/1899#) and 2 through 12 as January! Not
> what you want!
>
> Instead, you can either use
>
> Format(DateSerial(2004, StartMonth, 1), "mmmm")
>
> or create a little twelve-row table with a field for the month number
> and for the month name.
>
> John W. Vinson[MVP]
>
- Next message: Sam: "Number rounding"
- Previous message: brentus_at_yahoo.com: "Re: Relate Records with Checkboxes"
- In reply to: John Vinson: "Re: Month only field problem"
- Next in thread: Duane Hookom: "Re: Month only field problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|