Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / November 2005

Tip: Looking for answers? Try searching our database.

mmyyyy field on form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gg - 30 Nov 2005 19:53 GMT
I have a process_month_year field that I set up in a table as Text-mmyyyy.  
However, now I'm finding out now that it was a bad design because I can't
sort on it.  I do need to display it as a month name on the input form later
down the road.
Would you recommend setting it up as a date field (but I don't want it
mm/01/yyyy-even when I define it with input mask 99/9999) or Number-integer?

Thank you!
AkAlan - 30 Nov 2005 20:00 GMT
Any date field can be formatted to display the date however you want. The
simplest way is in the properties of the text field where the date is going
to be displayed. Under the Format tab, Format, you can select Med Date from
the drop down list provided. If you want a very specific display look in help
under the Format function or even the DatePart function. This will allow you
to only display that part of the date field you want.

> I have a process_month_year field that I set up in a table as Text-mmyyyy.  
> However, now I'm finding out now that it was a bad design because I can't
[quoted text clipped - 4 lines]
>
> Thank you!
gg - 30 Nov 2005 20:44 GMT
Thanks!  Ok, I'll change my format to Date/Time and select format=Short Date.
But, when the user enters mm/yyyy, do I need to rebuild the date in order to
store it since now it is entered as only mm/yyyy and not mm/dd/yyyy which is
how it is stored in the table?  Please just clarify. Thank you! :)

> Any date field can be formatted to display the date however you want. The
> simplest way is in the properties of the text field where the date is going
[quoted text clipped - 11 lines]
> >
> > Thank you!
AkAlan - 30 Nov 2005 21:06 GMT
You can enter just a month and year in a date field without a day and it will
store it  with the default of the 1st day. If you never show the day or care
about it then no need to change anything.

> Thanks!  Ok, I'll change my format to Date/Time and select format=Short Date.
> But, when the user enters mm/yyyy, do I need to rebuild the date in order to
[quoted text clipped - 16 lines]
> > >
> > > Thank you!
gg - 30 Nov 2005 21:57 GMT
Thank you, Alan!  
One more question.  If I was using NZ(process_month_year,"") function
previously when the field was a text field, and now it's a date formatted
field, what is the equivalent function instead of the NZ (i.e. if the date is
a null value)?

> You can enter just a month and year in a date field without a day and it will
> store it  with the default of the 1st day. If you never show the day or care
[quoted text clipped - 20 lines]
> > > >
> > > > Thank you!
AkAlan - 30 Nov 2005 22:20 GMT
Have you ever used an Inline If function. This might work, put it as the
control source of the Date field you are concerned with.

=IIf(IsNull([DateField]),"SomeValue",[DateField])

If the date field is null you get what ever is after the first comma,
otherwise you get what is after the second comma.

> Thank you, Alan!  
> One more question.  If I was using NZ(process_month_year,"") function
[quoted text clipped - 26 lines]
> > > > >
> > > > > Thank you!
gg - 30 Nov 2005 22:38 GMT
Ok.  Will try this.  Thanks!!

> Have you ever used an Inline If function. This might work, put it as the
> control source of the Date field you are concerned with.
[quoted text clipped - 34 lines]
> > > > > >
> > > > > > Thank you!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.