Formula

D

David F

I have a calculation that I have made to work in Excel...but I realy need it
to work in Access.
I need to calculate from the number of hours a machine has been run, when it
is due for its next service.
1 - 250
2 - 500
3 - 250
4 - 1000
5 - 250
6 - 500
7 - 2000
8 - 250
This is the information in the table I need to use.
IN Excel I was able to use VLOOKUP to get the value I need to include in the
calculation.
How do I get a similar function in Access?
 
J

John W. Vinson

I have a calculation that I have made to work in Excel...but I realy need it
to work in Access.
I need to calculate from the number of hours a machine has been run, when it
is due for its next service.
1 - 250
2 - 500
3 - 250
4 - 1000
5 - 250
6 - 500
7 - 2000
8 - 250
This is the information in the table I need to use.
IN Excel I was able to use VLOOKUP to get the value I need to include in the
calculation.
How do I get a similar function in Access?

You don't. Instead you use Access as a relational database - not as a
spreadsheet on steroids!

Create a Table with this information. JOIN it to your table by some
appropriate field (I have no idea what the 1 to 8 mean, but I'm guessing
that's a machine type code?).

John W. Vinson [MVP]
 
D

David F

The 1 - 8 is the 8 different levels of service the machine will get in the
appropriate sequence.
I need to take the appropriate 1 - 8 number and take the number of hours it
represents and do some math with it.
I see it's DLOOKUP by the previous post...I just need to work on it to make
it work the way I need to. So far I just get #ERROR.
 
J

John W. Vinson

The 1 - 8 is the 8 different levels of service the machine will get in the
appropriate sequence.
I need to take the appropriate 1 - 8 number and take the number of hours it
represents and do some math with it.

My query suggestion will do exactly that. Care to try it? It *will* work.
I see it's DLOOKUP by the previous post...I just need to work on it to make
it work the way I need to. So far I just get #ERROR.

DLookUp will work, done correctly. If you'll post what you've tried perhaps
someone can suggest how to fix it. However, it will be MUCH slower than a
query joining to the table.

John W. Vinson [MVP]
 

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