Calculator

Gismo

Registered User.
Local time
Today, 11:22
Joined
Jun 12, 2017
Messages
1,298
Hi all,

Is there an easy way to create a calculator on a form?
 
you mean with 10 number buttons plus multiply/divide/add/subtract?

if so, what is wrong with using the built in windows calculator?

if you mean for user to type in a calculation, use the eval function

?eval("(23*2)+55")
101
 
@bastanu That calculator, like many other add-ins was never upgraded to support 64-bit Office
 
I never needed one, just did a Google search and posted some of the results...
 
That's fine. Just pointing out that it sadly, has an expiration date unless the developer chooses to recompile it. I can't imagine that it takes much to convert from 32-bit to 64-bit. If the app is using API code the definitions need to change as they do with Access.
 
I think I have a few examples at home using just native Access controls (no API). I assume you do not want the built in calculator, since you want the value from the calculation to appear in the control that called the calculator. That is what these do.
 
I can use the built in windows calculator but some of the staff don't really have much computer literacy, so having the calculator on the same form where a few values needs to be added, will make it much easier for the user, instead of having to open up the windows calculator, just a preference
 
I can use the built in windows calculator but some of the staff don't really have much computer literacy, so having the calculator on the same form where a few values needs to be added, will make it much easier for the user, instead of having to open up the windows calculator, just a preference
Why not just have a button that opens the windows calculator? Seems like a lot of work, for such a simple task? :(

 
Sorry forgot the attachment. Demo again.
 

Attachments

you can also put the "calculation" directly to the textbox like in the demo.
 

Attachments

Try this...

CSS:
    Dim stAppName As String
    stAppName = "C:\WINDOWS\system32\calc.exe"
    Call Shell(stAppName, 1)
 
Try this...

CSS:
    Dim stAppName As String
    stAppName = "C:\WINDOWS\system32\calc.exe"
    Call Shell(stAppName, 1)

Taking this one step further, I have a free example app with a ribbon to run several external apps from Access including Calculator, Snipping Tool, Notepad, Paint etc


I selected apps I most often use whilst developing in Access:
1736120456087.png


Its very easy to do and the idea can be adapted to run any external app of your choice using Shell or similar.
 

Users who are viewing this thread

Back
Top Bottom