Discussion Locked

Calculator in access

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
My friend wants to put a calculator applet into a form on Microsoft Access. Can you recommend any applets which will perform this requirement. Just a very simple + and - calculator, but one that is easy to use (ie: looking like the XP calculator) and also a calendar but this is not really as important.

2 replies

by entawanabi

Why not just move the one already in Access?

No, I don't know how I have to read the instructions.

by tink!

I ran across this the other day when I was working on a macro:

[SendKeys Statement Example
This example uses the Shell function to run the Calculator application included with Microsoft Windows. It uses the SendKeys statement to send keystrokes to add some numbers, and then quit the Calculator. (To see the example, paste it into a procedure, then run the procedure. Because AppActivate changes the focus to the Calculator application, you can't single step through the code.). On the Macintosh, use a Macintosh application that accepts keyboard input instead of the Windows Calculator.

Dim ReturnValue, I
ReturnValue = Shell("CALC.EXE", 1) ' Run Calculator.
AppActivate ReturnValue ' Activate the Calculator.
For I = 1 To 100 ' Set up counting loop.
SendKeys I & "{+}", True ' Send keystrokes to Calculator
Next I ' to add each value of I.
SendKeys "=", True ' Get grand total.
SendKeys "%{F4}", True ' Send ALT+F4 to close Calculator.]

Just look up "sendkeys" in Access Help. and click the example. The first part shows you how to tell Access to open the Windows Calculator.

This discussion is closed to new replies.