Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2013
    Posts
    2

    Exclamation Unanswered: Access crashing when using command btn

    I am new to this forum and I am lookng for help with one of my db.
    I created a database to keep track and update my usernames and passwords.
    It is made of up a 1 table and a couple of queries and forms.
    My problem is running vba code from a command button. I am not sure if it my code or a bad install of MS Access 2007.
    When I open the db and use a button it performs the correct funtion.
    If I were to click the same button or a different button Access crashes hard.
    Here it my code for rotating the passwords and doing a copy.

    Private Sub Command34_Click()
    Me.PreviousPassword = Me.CurrentPassword
    Me.CurrentPassword = Me.Password1
    Me.Password1 = Me.Password2
    Me.Password2 = Me.Password3
    Me.Password3 = Me.Password4
    Me.Password4 = Me.Password5
    Me.Password5 = Me.Password6
    Me.Password6 = Me.PreviousPassword
    Me.PreviousDate = Me.DateChanged
    Me.DateChanged = Date
    End Sub

    ---------------------

    Private Sub Command37_Click()
    Me.CurrentPassword.SetFocus
    DoCmd.RunCommand acCmdCopy
    End Sub

    Is there anything wrong with my code or is there a better way?
    Thanks in adavance for your response.

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Be aware that this is double-posted here

    Access crashing when using a command button

    vad60: Most forums have no problem with a question being posted on multiple sites, but forum etiquette requires that you state this fact and give the URLs for the other posts. This keeps members on all involved sites from wasting their time giving duplicate suggestions.

    Welcome to dbforums!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Dec 2013
    Posts
    2
    Sorry, it has been a long time since I used the forums and I completly forgot.
    My apologies. It won't happen again.

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    As I said, there's no problem with 'casting your net' over multiple forums; the more eyes looking at a problem, the better...usually! Just let everyone know so we don't duplicate efforts!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •