unit converter

J

JohnLute

Anybody know of an Access unit converter design? My database has units of
measure tables and I've been tinkering with the idea of making a unit
converter with them.

Anybody ever attempt this? How did it go?
 
L

Larry Linson

I've seen some unit converter forms put together and used to demonstrate
calculations, etc., but I don't have a link to any, or even know if the
people thought theirs was worth preserving or publishing.

Larry Linson
Microsoft Office Access MVP
 
J

JohnLute

I sure wish I could've seen those! I'm not finding anything! This is amazing
as Access seems to be perfectly suited for this task.
 
L

Larry Linson

What are you, specifically, hoping to do -- create a general unit conversion
lookup form, or create code for a limited set of conversions to use in your
application, or ???. Post back with some clarification and there's a good
chance someone can offer useful suggestions.

For example, in the latter of the two cases I mention, this function would
convert

Function HowManyInches (Centimeters as Single) as Single

HowManyInches = Centimeters / 2.54

End Function

You would, of course, want to add some error handling, or perhaps use a more
accurate conversion factor. For a general conversion form, you'd put
similar code in the AfterUpdate event of a Control into which the user
entered the "convert-from" value, but instead of simply returning the value,
as the function above, it would set the calculated value into the control
that is intended to display the "convert-to" value. Or, you could make it
more complicated by allowing the user to choose the convert-from and valid
convert-to units, then enter the value, then use that input to determine the
calculation to perform.

Larry Linson
Microsoft Office Access 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