By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,121 Members | 1,723 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,121 IT Pros & Developers. It's quick & easy.

Difference Between Two Number Fields

P: 31
Hi All,
I need to create a query that will look at two fields containing numbers, and give me the difference between the two. I have found alot of info for comparing two dates, but not simple numbers.
The two fields are "Minutes Booked" and "Actual Minutes Used"
Just an insight, this is for a surgeon booking an operating room, and how long they were actually in there, both in minutes as a whole number.
i.e. Minutes Booked: 30
Actual Minutes Used: 20
the difference would be +10 minutes.
and if the numbers were reversed, the difference would be -10 minutes.
I would greatly appreciate any help you can give.
Thank you in advance.
Dec 10 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 489
In query builder
Expand|Select|Wrap|Line Numbers
  1. TimeDiff: [Minutes Booked] -  [Actual Minutes Used]
Where TimeDiff is whatever name you want and the other two are the actual names of your fields in the table.

Or you can do the calculation directly on your report or form by setting the control source to of an unbound text box to
Expand|Select|Wrap|Line Numbers
  1. =[Minutes Booked] -  [Actual Minutes Used]
Using the actual names of the controls on the form/report.
Dec 10 '08 #2

P: 31
You know, sometimes things are so simple, that you tend to overthink it.
Thanks for your help, it worked great.

Dec 10 '08 #3

Expert 100+
P: 489
Glad I could help, and we all have days like that ;)
Dec 10 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.