Results 1 to 9 of 9
  1. #1
    kdleaver1974 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    13

    Why can I no longer add Control Spin Button in Access 2013

    I have a program that is using the Control Spin Button. This control gave me no issues before, however I had to reinstall Access 2013 and I need to add this control back to my Access 2013, but when I try to do so the following error comes up:



    Sorry an unexpected error occurred. Please exit and restart Microsoft Access


    I have done this multiple times, still the same error. What am I not doing properly?

    Thanks for the help.

    Ken L

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,739
    Try closing the DB entirely and reopening it to try again.
    On occasion, I've had to reboot the PC for Access changes to "take".

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    Could also try a repair?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    kdleaver1974 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    13

    Still doesn't work

    OK, so I did a reboot of the OS, AND I did a repair of the Database, and it still won't allow me to add it. I don't understand as I was able to add this feature before and it worked fine. Why would reinstalling Access create this error that it won't all me to add this function back because without it, the control doesn't work.

    Ken L.

  5. #5
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    Just a guess but pretty sure the spin control is 32bit and there may not be a 64bit alternative if you have reinstalled access as 64bit

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    Quote Originally Posted by CJ_London View Post
    Just a guess but pretty sure the spin control is 32bit and there may not be a 64bit alternative if you have reinstalled access as 64bit
    Perhaps read here then?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    kdleaver1974 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    13
    Looks like that explains the problem. The reason for the "spin control" IIRC was this was the only way to add a control that can increase and decrease the number in a text box. The Text box is for item quantity and it needs to be limited in range from one (1) and the upper limit being the inventory on hand. What other control can I use to accomplish this in a 64-bit version of access.

    Thanks.

    Ken L

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    Roll your own?
    1 textbox
    2 small buttons with up and down arrows.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  9. #9
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    or simply have a textbox to display the number and use the mouseup event to determine where the control was clicked to decide whether to increment or decrement the value - see example

    and this is the code

    Code:
    Option Compare Database
    Option Explicit
    
    
    Const maxnum = 20
    
    
    Private Sub Text2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    
    
        If X < Text2.width / 2 Then
            If Text2 > 1 Then
                Text2 = Text2 - 1
            Else
                MsgBox "cannot be zero", , vbOKOnly
            End If
        Else
             If Text2 < maxnum Then
                Text2 = Text2 + 1
            Else
                MsgBox "cannot be greater", , vbOKOnly
            End If
       End If
       
    End Sub
    Modify maxnum to be determined by your record count

    You don't have to display the instructions - they are also in controltip text. You can also refine the location where action is required and add left/right arrow characters to the text (although this would stop it being numeric (use replace to get rid of them to change back to number)
    Attached Thumbnails Attached Thumbnails image_2025-07-29_110328860.png  
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 7
    Last Post: 04-19-2018, 12:57 PM
  2. Replies: 4
    Last Post: 02-06-2015, 03:58 AM
  3. Query no longer working in Access 2013
    By aytee111 in forum Access
    Replies: 4
    Last Post: 09-11-2014, 06:48 PM
  4. Replies: 4
    Last Post: 02-12-2014, 12:49 PM
  5. My head is starting to spin
    By eww in forum Queries
    Replies: 1
    Last Post: 08-30-2010, 02:43 PM

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