UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Units Conversion Utility, Access 2010    
 
   
oskar
post Feb 16 2019, 09:29 AM
Post#1



Posts: 201
Joined: 24-May 13
From: Montreal, Canada


I’m working to make a small units conversion utility for my own use and was planning to use Excel 2013 but then I thought perhaps Access 2010 maybe a better choice since Access is more flexible in designing a better GUI.

Although Excel is better in calculations, the units conversion utility requires just simple multiplications with the factors I provide so I don’t see a problem

What is your opinion?



Go to the top of the page
 
GroverParkGeorge
post Feb 16 2019, 09:42 AM
Post#2


UA Admin
Posts: 35,324
Joined: 20-June 02
From: Newcastle, WA


What kinds of units are of interest?

I can see doing this in either application, as well. I think you are also right about the GUI possible in an Access form. In addition, unless this unit conversion is really complex, I can't see how Excel would be better at the basic math.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
oskar
post Feb 16 2019, 11:39 AM
Post#3



Posts: 201
Joined: 24-May 13
From: Montreal, Canada


It’s only basic conversion units like area, lengths, volume, temperature and velocity. I have a home built cnc mill and quite often I use the Windows 10 calculator which is very time consuming to use. In any case as a small project I thought I could make one myself, with the help from others regarding code, which will be much easier and simple

Go to the top of the page
 
GroverParkGeorge
post Feb 16 2019, 11:43 AM
Post#4


UA Admin
Posts: 35,324
Joined: 20-June 02
From: Newcastle, WA


That definitely makes sense.


Would you want to convert, for example, gallons to ounces? Or would you want to convert gallons to liters?

Or do you need to do both?

It's possible to create a mapping table for either or both.


--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
oskar
post Feb 16 2019, 12:22 PM
Post#5



Posts: 201
Joined: 24-May 13
From: Montreal, Canada


For both will be much better
I will try to find a units converter I used when I was working but it was based in WindowsXP and although I got it going in Vista, I cant make it to work in Windows 10. I will snip the simple interface and post it here soon
Go to the top of the page
 
oskar
post Feb 16 2019, 01:50 PM
Post#6



Posts: 201
Joined: 24-May 13
From: Montreal, Canada


I'm surprised my Vista desktop still works, haven't used it in ages but here it is the GUI I want to achieve.

I have no use for the first column at the left "General" but I want to have the "Category" and of course the column at the right which now is called "Length" because I have clicked on the Length in the Category column.

So now in the "Length" column if I click lets say on "ft" and put a value say 20 I will see my 20 feet value instantly converted in all reaming units, quite easy, simple and fast. The same if I put a new value in any other unit it will be convert it in all the rest units.

Obviously I will not have all the categories listed in the category column neither all the listed units in the length column


Sorry George, not familiar with the attachments, says my upload is available in Manage Current Attachments but how do I put it in my post? Pls let me know if I have to do something else



Attached File(s)
Attached File  Units_Converter.JPG ( 64.73K )Number of downloads: 18
 
Go to the top of the page
 
GroverParkGeorge
post Feb 16 2019, 02:04 PM
Post#7


UA Admin
Posts: 35,324
Joined: 20-June 02
From: Newcastle, WA


That's a good tool. Too bad you can't just use it.

You'll need a mapping table, then.

Four fields seem to be needed at a minimum: Category, UnitFrom, UnitTo, Conversion.

So, one record could be:

Category: Length
UnitFrom: Feet
UnitTo: Meter
Conversion: 0.3048 ( or more decimal places if needed)

A second record would support conversion the other way:

Category: Length
UnitFrom: Meter
UnitTo: Feet
Conversion: 3.28084 ( or more decimal places if needed)


You'll need to include enough records to handle the conversions you encounter. You may not need to do both feet and yards to meters, because it's a simple multiplication/division problem. The same is true for meter, kilometer, etc.

However, you can decide that after trying out some things. I think the math, though, could be hard-coded into the code that does the conversion because there's virtually no chance a foot will ever be more or less than 12 inches, although some day we might convert to an all metric system (not in my life time, I'll bet).

Your form will need take the three inputs: UnitFrom, UnitTo and BaseAmount and use that mapping table to get the Conversion (DLookUp might work here, for example). Then multiply by the conversion factor to get to the Output.


--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
oskar
post Feb 16 2019, 04:03 PM
Post#8



Posts: 201
Joined: 24-May 13
From: Montreal, Canada


Very good info George to get me started, thanks

I will start to prepare what is needed and come back when I need more help

Go to the top of the page
 
isladogs
post Feb 16 2019, 09:03 PM
Post#9


UtterAccess VIP
Posts: 1,459
Joined: 4-June 18
From: Somerset, UK


The GUI looks a bit antiquated but if it does what you want it may be worth persevering with getting it to work in Win10
Was it created in Access? If so, which version?

If relevant, have you checked the reference libraries as some older references are not installed with Windows 10 & some do not work at all in 64-bit Windows 10
For example the Common Controls reference cannot be used in 64-bit Windows
Therefore the solution is to replace the code that depends on that reference as I did when updating this old utility by David Crake: View logged in users

HTH

--------------------
Go to the top of the page
 
oskar
post Feb 16 2019, 10:27 PM
Post#10



Posts: 201
Joined: 24-May 13
From: Montreal, Canada


Well it may be antiquated but I have never found a similar utility which with a single click will convert one unit to many other similar units in the same window, fast and simple. I agree the GUI is old but it’s not important to me and in any case I will try to make something better if I succeed, lol

I have no idea of the platform it was made but I do know it was made by a local university professor and the company I worked at the time bought a number of license for the office staff. That was in early 1990’s so I don’t remember if at that time we were running Windows 98 or XP

Go to the top of the page
 
isladogs
post Feb 16 2019, 10:35 PM
Post#11


UtterAccess VIP
Posts: 1,459
Joined: 4-June 18
From: Somerset, UK


That was exactly the point I was making. If it does what you want, it doesn't matter if it looks old fashioned
So use it if it can be made to work.
Is it an Access file MDB / ACCDB? If not what is the file type?

Perhaps you meant he early 2000s. If it was the early 1990s you weren't running XP or 98. Probably 3.1
This post has been edited by isladogs: Feb 16 2019, 10:37 PM

--------------------
Go to the top of the page
 
oskar
post Feb 17 2019, 08:14 AM
Post#12



Posts: 201
Joined: 24-May 13
From: Montreal, Canada


The file is WinMetrics.Exe and you are right I'm talking in early 1990 so most likely we were using 3.1
Go to the top of the page
 
isladogs
post Feb 17 2019, 09:35 AM
Post#13


UtterAccess VIP
Posts: 1,459
Joined: 4-June 18
From: Somerset, UK


OK so it not likely to be rescuable unless you launch it in compatibility mode.

Unless you really want to reinvent the wheel, I suggest you go to the Windows Store and search for unit conversion.
There are lots of free apps there and I expect you will find something suitable

I've just downloaded one with 4 star reviews and it look like it does everything in your screenshot.


--------------------
Go to the top of the page
 
oskar
post Feb 17 2019, 04:12 PM
Post#14



Posts: 201
Joined: 24-May 13
From: Montreal, Canada


Hi George, besides the mapping table I assume that I have to make tables for each of the categories (Length, Area, etc.) and then the mapping table will connect these tables?

I started making the tables (pls see the attached) but in units column I have format the numbers as text because if I format as numbers it does not take decimals. Also I wonder if Access can read scientific numbers as shown on my table.

Is the above correct or I’m heading in the wrong direction?

Thanks


Attached File(s)
Attached File  Capture.JPG ( 42.3K )Number of downloads: 8
 
Go to the top of the page
 
kfield7
post Mar 29 2019, 10:57 PM
Post#15



Posts: 971
Joined: 12-November 03
From: Iowa Lot


I use a tool called convert.exe, have been using it for at least 20 years.

convert

Also created my own set of functions and example queries for use in some of my Access databases.
Go to the top of the page
 
kfield7
post Mar 29 2019, 10:58 PM
Post#16



Posts: 971
Joined: 12-November 03
From: Iowa Lot


I use a tool called convert.exe, have been using it for at least 20 years.

convert

Also created my own set of functions and example queries for use in some of my Access databases.

sorry for duplicate post.frown.gif

This post has been edited by kfield7: Mar 29 2019, 10:59 PM
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    22nd July 2019 - 10:59 AM