Calculated fields in Access

M

Michael

I have two fields in an Access data base which has a form.

I'd like to run a calculation on two of the fields and
have the results show in a third on the form and without
having to run a query.

The two fields that have input data are StartTime and
EndTime. The third Filed should have Duration in Hrs:Mins.
I have tried entering =[endtime]-[starttime] in the
desired results field entering and I entered formula in
validation rule. I get no error message but when times are
input in both StartTime and EndTime the Duration filed is
blank.

Any help you can give would be greatly appreciated.
 
J

Joshua A. Booker

Michael,

You need to opout he formula in the ControlSource property of the Duration
Field. The ValidationRule is to validate the data being entered and has no
effect on a calculated control.

HTH,
Josh
 
C

Chet

The default result of VB of [endtime]-[starttime] is the number of day. you
have to format it by using Format function. try NZ function.
 

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