Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2014
    Posts
    12

    Unanswered: VBA Run-time Error 2450

    I have a small VBA code in a form designed to update a Combo box in another form. However, I am using the same form as a subform in a different spot. The following VBA code works great for updating the combo box when I have that form open, but when I don't have the combo box form open I get the run-time error 2450. see the code below. How come the On Error Resume Next isn't working?

    Private Sub CloseForm_Click()

    Forms!frm_ProductDetails!cboProductColor.Requery
    On Error Resume Next
    DoCmd.Close
    End Sub

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    the error handler works for lines following its declaration. But as to why youd want to requery a combo box whrn you close the form beats me
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    496
    Provided Answers: 24

    err handle

    On Error Resume Next
    SHOULD be the 1st line (to catch the error)

Posting Permissions

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