Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2013
    Posts
    3

    Unanswered: Run-time error -2147024809 (80070057)

    I get the preceding error message when trying to open a specific report. below is the VB code with the highlighted (problem) text;

    Private Sub cmdOpenReport_Click()
    Dim stDocName As String
    astrParams (0) = "'" & Me.cboAirspace & "'"

    stDocName = "rptActsSpecial"
    DoCmd.OpenReport stDocName, acViewPreview
    Me.Visible = FALSE

    End Sub

    Any Ideas?

  2. #2
    Join Date
    Nov 2011
    Posts
    413
    Try this instead:
    Forms!yourformname.Visible = False

  3. #3
    Join Date
    Aug 2013
    Posts
    3
    Thanks Burrina but that just returned a different Run-time error 2450 - cannot find the referenced form 'frmActsSpecial'. The odd thing is that the other selections on the referenced combo box all bring up the report correctly. The last entry on the combo box just gives me this error. The entries are based on date ranges and reports data for those selected ranges.

    Any other ideas.

  4. #4
    Join Date
    Nov 2011
    Posts
    413
    Are you sure this form is still open and not just Invisible?

  5. #5
    Join Date
    Aug 2013
    Posts
    3
    I'm not sure at this point... How would I know this? I had considered this but as I said the other combo box selections work fine.

  6. #6
    Join Date
    Nov 2011
    Posts
    413
    Check the code for the current form and see what is there. If there is a Close procedure that should NOT be there.What is the name of the form that is open when you try and open this report? In design mode, look at any event code that is there.

Posting Permissions

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