Share via

Error 2103 with open report

Anonymous
2011-01-04T16:35:37+00:00

I made come changes to a report that I call from a form and now I get this Error 2103 that tells me the report name I entered in either the property sheet or macro is misspelled or refers to a report that does not exist.  It is not a macro or the macro name would be displayed (or so I read) and the report exists and in fact works if I run it directly, outside of the form.  Does anyone know what could cause this.  TIA

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2011-01-04T20:10:06+00:00

Change this:

acViewNormal

to this:

acViewPreview


Bob Larson, Former Access MVP (2008-2010) http://www.btabdevelopment.com (free Access tools, tutorials, and samples)

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

9 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-01-04T19:38:09+00:00

    Bob,

    Please see response to Karl for name.  I am not sure what you mean byt the VBA window.

    thanks

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-01-04T19:37:28+00:00

    Karl,

    Here is the code in the Event Procedure from the form button:

    Private Sub cmdtable3_Click()

        On Error GoTo cmdtable3_ERR

        DoCmd.SetWarnings False

        DoCmd.Close acForm, "frmMain"

        DoCmd.OpenQuery "qrymktbl2_01_data_order"

        DoCmd.OpenReport "rptNES_GW_Results", acViewNormal

        DoCmd.SetWarnings True

    Exit_cmdtable3:

        Exit Sub

    cmdtable3_ERR:

        MsgBox "Error " & Err.Number & ": " & Err.Description

        Resume Exit_cmdtable3

    End Sub

    rptNES_GW_Results is the name of the report, the truth!  :-)  and this is the only place from which it is called.

    thanks

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-01-04T16:54:49+00:00

    javablood wrote:

    > I made come changes to a report that I call from a form and now I get

    > this Error 2103 that tells me the report name I entered in either the

    > property sheet or macro is misspelled or refers to a report that does

    > not exist.  It is not a macro or the macro name would be displayed

    > (or so I read) and the report exists and in fact works if I run it

    > directly, outside of the form.

    What exactly do you mean by "call from a form"?

    If you e.g. click on a command button then open the form in design

    view and in the properties of the command button look for the

    property "On Click". Then it depends on the text in the property.

    If the text is "[Event procedure]" then set the cursor into the property

    line and click on the little button (with the 3 points on it) to the right

    of the line. This will open the VBA editor and you should see some

    lines of code. In one of the lines you will see the name of the report.

    e.g.

    stDocName = "SomeReportName"

    Here you can change the name of the report if it isn't correct any more.

    Then save the changes by clicking on the save button in the command

    bar and close the code editor.

    Of course all this can be different depending on how you actually

    call the report, what you see in the property sheet and when you

    click on the editor button etc. So tell us the truth! ;-)

    --

    cu

    Karl

    *********

    Access-FAQ (German/Italian): http://www.donkarl.com

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-01-04T16:37:33+00:00

    Hard to tell without knowing what the name of the report is and what you put in the macro or property sheet.  Did you attempt to put something in an event property that should have been in the VBA window instead?  That is a common error.


    Bob Larson, Former Access MVP (2008-2010) http://www.btabdevelopment.com (free Access tools, tutorials, and samples)

    Was this answer helpful?

    0 comments No comments