ACC1x: Reserved Error (-1603) Previewing a Report

ID: Q109401


The information in this article applies to:


SYMPTOMS

When you preview a report, you receive the error message:

Reserved error (-1603); there is no message for this error.


CAUSE

This error occurs when an Access Basic function references a field in the report's underlying data that is not on the report and the resulting dynaset is empty.


RESOLUTION

Place the field referenced by the function on the report. If you do not want to see the field on the report, set the field's Visible property to False.


STATUS

Microsoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.


MORE INFORMATION

Steps to Reproduce Problem


  1. Start Microsoft Access and either create a new database or open one of your choosing.


  2. Create the following new table:
    
          Table: Table1
          -------------------
          FieldName: ID
             DataType: Number
    
          Table Properties: Table1
          ------------------------
          PrimaryKey: ID 


  3. Add the following values to the ID field:
    
          ID
          --
          1
          2
          3 


  4. Create the following query based on Table1:
    
          Query: Query1
          ---------------
          Type: Select
          Field: ID
             Criteria: 10 

    Note that this query returns no records, which is necessary for duplicating the error message.


  5. Create a new module and enter the following sample function:
    
          Function MyFunction (C As Control)
             Debug.Print C
          End Function 


  6. Create the following new report based on Query1:
    
          Report: Report1
          -----------------------------------
          RecordSource: Query1
          Text box: Field1
             ControlSource: =MyFunction([ID]) 

    Note that the ID field is not on the report.


  7. Preview the report.


Additional query words: Reports AB


Keywords          : kberrmsg kbusage RptOthr 
Version           : 1.0 1.1
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: March 30, 1999