[AccessD] A2K: This should be easy

Gustav Brock gustav at cactus.dk
Mon Mar 17 03:58:00 CST 2003


Hi Darren and John

> The DateAdd function should work

>     DateAdd("n", -15, txtStartTime)

Be careful. If the textbox is unbound, it can contain anything.
To be safe, you can wrap it in a validate check:

   If IsDate(txtStartTime) Then
      txtStartTime = DateAdd("n", -15, txtStartTime)
   End If

/gustav

> "Commit to the Lord whatever you do,
>         and your plans will succeed." Proverbs 16:3

Oh, if it was that easy many things would look different.


> 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.




More information about the AccessD mailing list