Changing Time using a macro

  • Thread starter Thread starter Waitsu
  • Start date Start date
W

Waitsu

I have a form where you enter in a time in HH:MM format and displays it in
military time.

I want to be able to add or subtract a specific number of hours from that
time and save it in a different field on the same form.

I tried using the following =DateAdd("h",-1,[fielda]) in the macro under the
set value option but I get an error.

I can get this to work if I create another field called fielda-date and set
the control source to =dateAdd("h",-1,[fielda-date]) then use the macro to
set the value of fielda to fielda-date - but that is the long way.

Is there a way to do this without having to go through the alternate process?
 
Back
Top