Changing Time using a macro

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top