Calculator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eliasendashaw
    New Member
    • May 2022
    • 1

    #1

    Calculator

    Hi. I wanted to create a calculator with ms access that works both on click and when pressing the key on keyboard and I have no idea on how to. Can you show me or send a video please?
  • isladogs
    Recognized Expert Moderator Contributor
    • Jul 2007
    • 483

    #2
    Creating a calculator in Access is likely to be a lot of work and require a good knowledge of VBA coding.
    But why reinvent the wheel?
    I suggest that you instead use code to open the built-in Windows calculator from Access

    Code:
    Call Shell("CALC.EXE", 1)
    Last edited by isladogs; May 19 '22, 11:09 AM. Reason: Added code line

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32669

      #3
      Hi Elias.

      The short answer to your question is "No. We cannot." Doing your work for you is not what Bytes.com is about or for. We are happy to assist you in developing your own solutions, and sometimes we can point you to somewhere that should be helpful for you. We do not though, simply perform requests for work. Even if we wanted to the site rules forbid it, as we're here to help and doing it for you only encourages you not to do any work for yourself.

      While my fellow moderator isladogs has already pointed out that doing this within Access is fairly pointless, we would be happy to help you through developing such a project if you still feel you'd like to. The process itself could be helpful as you'd learn about handling various Events and other management of Forms.

      Let us know if you plan to proceed by telling us what you've already tried and where you've got stuck.

      Otherwise, of course, isladogs' suggestion is a very simple and effective one ;-)

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #4
        I have attached a Demo for you straight out of the Access 2002 Developers Handbook, IMHO one of the best references ever created for Microsoft Access. It demonstrates a fully functional, purely Access based Calculator (Mouse & Keyboard activated) and consists of only a single Form (frmCalc) and Standard Code Module (basCalc). All extraneous Objects have been removed. It is rather simplistic, but an excellent starting point for you to learn how this can be done. It also can easily be expanded to include additional, more complex, functionality. The Code may be a little tough to process for a beginner but give it a try and be patient. Should you have any questions, we are here to help.

        P.S. - I did get prior authorization from my old pal NeoPa to Upload this Demo.
        Attached Files
        Last edited by zmbd; May 21 '22, 09:11 PM. Reason: 🌟🌟🌟🌟🌟

        Comment

        Working...