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 / Modules / DAO / VBA / April 2006

Tip: Looking for answers? Try searching our database.

Follow-up field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Angie M. - 31 Mar 2006 02:26 GMT
Hi, I'm using Access XP.

I have a field called Follow-up which needs to store either 1 Hour, 3 Hours,
1 Day, 1 Week, 1 Month or 3 Months.  I will set up a combo box to give the
user these choices, but I can't figure out what data type to use - I see
Date/Time, and the Short Time format which would work for the first 2, but
what about the day and months?  This needs to be a real time period vs. text,
because later we will want to run calculations on this data.  Any help is
appreciated.  thank you.
Allen Browne - 31 Mar 2006 06:09 GMT
Use 2 fields: one for the number, and one for the period type.

For the period type, use a combo box that has these properties:
   Row Source Type    Value List
   Row Source              "d", "days", "m", "months", "yyyy", "years"
   Bound Column         1
   Column Count          2
   Column Widths        0

The followup date is then given by this expression:
   =DateAdd([PeriodType], [HowMany], [OriginalDate])
substituting your actual field names in the square brackets.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hi, I'm using Access XP.
>
[quoted text clipped - 7 lines]
> because later we will want to run calculations on this data.  Any help is
> appreciated.  thank you.
Angie M. - 04 Apr 2006 21:43 GMT
THANKS!  I will try this.  I would have NEVER thought of this, thanks for
your help.

> Use 2 fields: one for the number, and one for the period type.
>
[quoted text clipped - 20 lines]
> > because later we will want to run calculations on this data.  Any help is
> > appreciated.  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.