【问题标题】:Microsoft Access 2016 - Record source does not existMicrosoft Access 2016 - 记录源不存在
【发布时间】:2016-11-07 09:19:22
【问题描述】:

我在尝试打开报告时遇到了这个错误。

The record source '~sq_dProduct Summary~sq_dOLEUnbound0' specified on this form or report does not exist.

The name of the recordsource may be misspelled, the recordsource was deleted or renamed, or the recordsource exists in a different database.

In the Form or Report's Design view or Layout view, display the property sheet by clicking the Properties button, and then set the RecordSource property to an existing table or query.

它是一个空白的“打印预览”报告。但是当我右键单击报表并转到“设计视图”时,里面有数据。我不知道出了什么问题。有人可以帮忙吗?

【问题讨论】:

    标签: ms-access printing report


    【解决方案1】:

    当您在表单/报表的设计视图中使用构建器按钮设置 RecordSource 属性时,Access 使用此命名约定在后台创建查询。当您按下构建器按钮时,您会看到一个 QBE 窗口(按示例查询)。当您保存表单或报表时,Access 会创建此查询,将其从 DB 容器中隐藏,并在内部使用它,尽管您在 RecordSource 属性中看到实际的 SQL。这就是为什么它似乎在设计视图中起作用的原因。

    问题是数据库引擎无法再找到这个“缓存”的隐藏查询。

    我愿意:

    • 将表单或报表的 RecordSource 属性复制到文本文件。
    • 删除报告 RecordSource 修复并压缩数据库
    • 重新打开报表,然后再次粘贴到 RecordSource。

    如果您使用的子表单、组合框、列表框等也可能具有 RecordSource 属性,您应该对它们执行相同操作,直到找到罪魁祸首。换言之,在报表/表单设计中的任何位置,您都会看到 RecordSource 属性,该属性具有 SQL 语句作为 RecordSource 属性的值。

    解决此问题的可靠方法是创建一个普通查询,然后将所有表单/报告/控件的 RecordSource 属性设置为此永久 Access 对象。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-12
      相关资源
      最近更新 更多