PDA

View Full Version : Covert measurements using tables in Access



Ai_BG
09-25-2018, 03:48 AM
2292522926

I want to make a program where I can convert any type of measurements to any other type.
I have created a table with the values with factor to meter (see picture).

I would like to have to combo boxes to select which measurement to convert to and from, one field to put in the value and a last bok to show the result. (next picture)

The problem is that I dont know where to start, and where to go from here. Any tips?

OBP
09-25-2018, 08:01 AM
Have you created a Form yet?
Or the combos, Command Button or text box?
The VBA code for the calculation would be on the Button's "On Click" Event Procedure.

Ai_BG
09-26-2018, 11:33 PM
Have you created a Form yet?
Or the combos, Command Button or text box?
The VBA code for the calculation would be on the Button's "On Click" Event Procedure.


Yes, I have created a form. I have also used a table design to tell what to multiply with to convert any form (miles, KM, yard, centimeter, foot, meter, milimeter, mil and nautical mile) to meter.

In the form I have one field to enter the value which I want to convert, two combo boxes to choose what form I want to convert from and to, and in the end, one field where new value should appear.

OBP
09-27-2018, 06:51 AM
I have re-created your database and created the VBA code.
See attached database.
However your conversion factors are not accurate enough when converting Metric to Imperial and back again.