报表上有一个字段,该字段由单独窗体上的组合框填充。在执行我的代码时,我收到了一个错误:“无法找到表达式中提到的字段‘\1’--我在我的数据库中的另一个模块中有相同的代码,并且没有错误,所以我不知道我做错了什么。谢谢您的帮助。”
Private Sub Reportfilter_bt_Click()
If IsNull(User_cb.Value) = True Then
MsgBox "Please select a user from the dropdown menu", vbCritical, "Database Error"
Else
DoCmd.OpenReport "RWA Allocation by User", acViewReport
[Report_RWA Allocation by User].Filterby_txt.Value = User_cb.Column(1)
DoCmd.Close acForm, "RWA Task Report"
End If
End Sub
发布于 2015-07-15 21:39:09
即使名字是正确的,access也找不到我的报告。在代码运行之前,我不得不将其添加为对象,而不会出现任何错误。
https://stackoverflow.com/questions/31439970
复制相似问题