Darren Dick
d.dick at uws.edu.au
Mon Mar 17 19:24:00 CST 2003
Hi Guys thanks for the replies. I'll explain what I am doing. We have a booking app. (Not mine) We can have many bookings entered for a day and even some at the same time. Amongst other things the Booking Start Time is captured by the other app. I display it in Me.txtStartTime I also have a combo Me.cmbWarningInterval that has list entries like 5,10,15,20,25,30,45,60 each representing minutes. If I select 15 from the combo I basically want a msgbox or some other event to fire 15 minutes before the StarTime Should be simple Many thanks for listening to me Darren -----Original Message----- From: accessd-admin at databaseadvisors.com [mailto:accessd-admin at databaseadvisors.com]On Behalf Of Drew Wutka Sent: Monday, 17 March 2003 6:01 PM To: 'accessd at databaseadvisors.com' Subject: RE: [AccessD] A2K: This should be easy I know people are going to post about the DateDiff function. But I'd like to get you thinking about what you are actually trying to do. Dates and Times are stored as numbers. The date is the whole number, which represents the number of days since 12-30-1899. Thus, since days are whole numbers, you can add or subtract days by simple math. (ie, to get tomorrow, it's Date()+1). Times are the fraction of the day. ie, .5 is noon, and .0 is midnight. Thus, you can also just simply add or subtract values to change the time. (ie, to get an hour from now, use Now()+(1/24)). Does that make sense? Also, another little known fact about the Date, Time and Now functions. They work both ways. If you use this line of code: Date=Date()+1 You've just set your systems date to tomorrow! <grin> Drew -----Original Message----- From: Darren Dick [mailto:d.dick at uws.edu.au] Sent: Sunday, March 16, 2003 8:46 PM To: Access Mail Group Subject: [AccessD] A2K: This should be easy Hello all This should be simple. I have a control on a form (txtStartTime). Formatted for Short time (i.e. hh:mm) I want to take say...5, 10 or 15 minutes from whatever time is in txtStartTime So take away 15 from 11:00 should give me 10:45 How do I do this. <Sigh> this should be easy. It probably is, I'm just brain fading. Darren _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com