Results 1 to 8 of 8
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2467 Runtime Error? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    I have the following code Private Sub Close_Form_Click() in frm_CR_Duplicates

    When the Close Command Button is clicked I display following message

    Yes - click works OK, lngViolTypeID is a Combo Box on the form I

  2. #2
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: 2467 Runtime Error? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    Why are you closing the form before the routine?
    Thanks
    chuck

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 2467 Runtime Error? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    Try changing

    DoCmd.Close

    to

    DoCmd.Close acForm, Me.Name

  4. #4
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2467 Runtime Error? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    No Joy

    [Delete_Record_Click] is a Command Button on the Form Footer I

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 2467 Runtime Error? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    Does it help if you use
    <code>
    Forms!frm_CR_ACD.SetFocus
    Forms!frm_CR_ACD![Delete_Record_Click].SetFocus</code>

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2467 Runtime Error? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    Same error

    I really only want to run Private Sub Delete_Record_Now() in the form I

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 2467 Runtime Error? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    You could make the Delete_Record_Now sub Public instead of Private. You should then be able to use
    <code>
    Form_frm_CR_ACD.Delete_Record_Now</code>

  8. #8
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2467 Runtime Error? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    That got it, much better technique

    Thanks for all your help

    John

Posting Permissions

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