Results 1 to 6 of 6
  1. #1
    Aosmond is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2013
    Posts
    8

    Button in form to open Windows Calculator

    Hello,
    I would like to know how to create a button in form to open the windows calculator. I have MS Access 2003, and running Window XP.

    Thank you



    Adam

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  3. #3
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    I am running on a WIN7 machine. You may have to change the path for wherever your calculator is located.
    Put this in the on click event for a command button
    Code:
    Private Sub Command0_Click()
    Dim RetVal
    RetVal = Shell("C:\windows\system32\calc.exe", 1)
    End Sub
    edit: Jack types quicker than me.

  4. #4
    Aosmond is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2013
    Posts
    8
    Thank you.


    Quote Originally Posted by alansidman View Post
    I am running on a WIN7 machine. You may have to change the path for wherever your calculator is located.
    Put this in the on click event for a command button
    Code:
    Private Sub Command0_Click()
    Dim RetVal
    RetVal = Shell("C:\windows\system32\calc.exe", 1)
    End Sub
    edit: Jack types quicker than me.

  5. #5
    Aosmond is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2013
    Posts
    8

    Button to open calculator Window XP Access 2003

    I used the code below for a button on a form to open Window calculator, but it did not work in my Window XP Access 2003, but the same code worked in my Window 7 Access 2010. What am I doing wrong. I checked the path of the calculator in the XP and it is C:\windows\system32\calc.exe


    Private Sub Command0_Click()Dim RetValRetVal = Shell("C:\windows\system32\calc.exe", 1)End Sub

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The code works in Access 2007 under Windows XP Version 5.1 SP3.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-06-2012, 12:53 PM
  2. Replies: 13
    Last Post: 07-18-2011, 10:05 AM
  3. cmd button to open form
    By stephaniehpcswf in forum Access
    Replies: 1
    Last Post: 02-23-2011, 04:46 PM
  4. mdb file won't open in Windows 7
    By Nice in forum Access
    Replies: 2
    Last Post: 02-16-2011, 12:42 PM
  5. Calculator on the form?
    By Peljo in forum Access
    Replies: 0
    Last Post: 02-28-2008, 02:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums