Results 1 to 9 of 9
  1. #1
    kristan is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    4

    Command buttons stop working after changing form's tab order

    I need to change the tab order on a form i've designed, but when i do this the command buttons on the form no longer work (i.e. clicking the button does nothing).



    i've tried changing tab order using the dialog box, and by editing the properties of the individual controls, but the problem still occurs.

    the command buttons work again when i revert to the original tab order.

    any ideas?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Odd, but the tabs will not effect code.
    what usu happens, when you click a button and nothing happens, for some reason, access security setting have reset.
    Macros are disabled, so in Access security ,turn on ENABLE all macros.

    mine did this and I almost went insane trying to find the reason why my buttons suddenly stopped working.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Want to provide db for analysis? Follow instructions at bottom of my post.
    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.

  4. #4
    kristan is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    4
    thanks ranman - agreed about it causing insanity.
    i've tried it with all macros enabled but the same thing occurs. at any rate, it seems to just be the one form - the other forms in the database do not have the same problem regardless of the security setting.
    i thought the form may have been corrupted so rebuilt it but the problem still occurs.

    thanks June - i've copied the relevant objects to a new database and uploaded to thread.
    the problem form is 'frmEnterSealsIds' - when the control 'batchId' is first in the tab order the buttons work; but when i set 'sealsId1' as first in tab order the buttons stop working (and i want sealsId1 to be first)
    pls note: i've put a 'close form' command button to test this since the other command button on the form runs some VBA that i dont want to run everytime i test this error. the 'close form' button would not be a part of the final form design.

    cheers guys
    Last edited by kristan; 09-18-2015 at 12:57 AM.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You removed so much things are broken. The objects referenced by the button code are not available.

    Why do batchID comboboxes have #Name? error?

    Makes no sense to have main form and subform bound to the same data. Perhaps you should consider a Split Form.
    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.

  6. #6
    kristan is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    4
    thanks June

    i did not have time to remove all sensitive data from this database so i just included the objects required to demonstrate the problem i was having.

    the batchId control is probably showing an error because it has a default value which references a different form which i did not include in the uploaded version of the database.

    what i've uploaded demonstrates the issue i was having with tab order/command buttons, but i appreciate your suggestion about a split form

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The issue is because of the code in sealsID1 combobox Exit event.
    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.

  8. #8
    kristan is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    4
    ah jeez of course - THANKS JUNE! so helpful to have a set of fresh eyes look at it

  9. #9
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by June7 View Post

    ...Makes no sense to have main form and subform bound to the same data...
    June7 is right! A Form/Subform from the same RecordSource will mean that one of the Forms will not be editable, since you have the same Record open twice, in different Forms. If you try to get into Editing the Records, you'll also start having Write Conflicts, always a hairball to sort out!

    When you create a New Record in the Subform, the Field named in the Subform Control's LinkChildFields Property normally inherits its Value from the Field named in LinkMasterFields. Typically, Access will assign the Primary Key Field to these Properties. If the Record on the Main Form is not at a New Record, the Subform will try to use the same Primary Key Value as the Record in the Main Form, and since they are both using the same Table, you'll probably get the Error Message:

    The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship

    June7's suggestion of a Split Form really sounds like the way to go!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Puzzled - Form controls stop working
    By vad77 in forum Access
    Replies: 6
    Last Post: 03-31-2014, 10:21 AM
  2. Navigational Buttons STOP working !!
    By THE STUDENT in forum Access
    Replies: 6
    Last Post: 06-11-2013, 04:20 PM
  3. Buttons STOP working !!
    By THE STUDENT in forum Forms
    Replies: 3
    Last Post: 06-10-2013, 08:11 PM
  4. Command Buttons Stopped Working on Form
    By genest11 in forum Reports
    Replies: 12
    Last Post: 02-06-2013, 06:59 AM
  5. Replies: 2
    Last Post: 10-09-2012, 12:52 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