Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    command buttons

    I have a main form that has command buttons to launch other things. The last one I created doesnt work until I select one of the other buttons and launch something. I close and then the button that wont work does. It only works after choosing another one first. Is there someone out there that has had this happen? Im using access 2003 and xp-pro for an O/S.

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    can you post your code?

  3. #3
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    command buttons again

    This is the code for the button in question.

    Private Sub Command69_Click()
    On Error GoTo Err_Command69_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Tax Information"
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    Exit_Command69_Click:
    Exit Sub
    Err_Command69_Click:
    MsgBox Err.Description
    Resume Exit_Command69_Click

    End Sub

  4. #4
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    What happens when you click the button before clicking something else? Does it act like it is being clicked (up/down states, showing the focus outline, etc...)? Does it give you an error?

    Can you also post the code from one of the other buttons you use which then causes Command69 to work properly?

  5. #5
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    command buttons again

    Nothing happens. It is like its not there. I click on a different button and it works. I close where it opened and try the one in question and it works.

  6. #6
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146
    This is from one that works perfect.

    Private Sub Command46_Click()
    On Error GoTo Err_Command46_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Billing"
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    Exit_Command46_Click:
    Exit Sub
    Err_Command46_Click:
    MsgBox Err.Description
    Resume Exit_Command46_Click

    End Sub

  7. #7
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    If you can export the form (no data source needed) I'll take a look at it. I've had similar happen in some of the DBs I have worked on and it's usually something less than obvious...

  8. #8
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    command buttons again

    I get this error when trying to attach my file.

  9. #9
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    Not familiar with that one but you might want to try it again.

  10. #10
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    command buttons again

    I compressed the file in a folder.

  11. #11
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    It looks like the Logon Info button is causing the problems. You can either disable TABbing to it, or move it to the end of the TAB order. If it's not being used, you could also just remove it.

    If you simly have to have it as is, you can set a command in the Form's OnLoad event to set focus to one of the other buttons (I used Command35) but any should work since PM Log and Logon Info are the top two in the tab order.

    The reason the Taxes button works after clicking on another button is because it passes the Logon Info button in the tab order.

  12. #12
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    command buttons again

    Im not familiar with tabs in access. Where do I find it to disable?

  13. #13
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    Select the button in editing mode and go to the Other section of the Properties. There, you will see a Tab Stop option -- set it to No.

  14. #14
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    command buttons again

    I tried setting to no on tabs but still acts the same.

  15. #15
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    Please upload the updated version

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Command buttons
    By maintt in forum Forms
    Replies: 3
    Last Post: 08-03-2010, 09:52 AM
  2. Replies: 13
    Last Post: 07-26-2010, 03:38 PM
  3. Replies: 2
    Last Post: 03-25-2010, 12:11 PM
  4. Moving Command Buttons
    By Pete Cope in forum Forms
    Replies: 0
    Last Post: 03-23-2010, 03:21 PM
  5. Access 2007 Command Buttons
    By fgerald in forum Access
    Replies: 2
    Last Post: 03-05-2010, 07:09 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