我想使用表单字段来检查表列值来预审查查询运行这是我有的代码,但我得到一个运行时间错误。VBA无法获得,如果elseif,else语句工作
' Set Warnings
DoCmd.SetWarnings False
If Forms!FrmCopyRoutingMenu!TextTarget = tblQuoteSection1Lines!tblQuoteMstrID Then
MsgBox ("Quote Section 1 Already Started! Please Copy Individual Sections.")
ElseIf Forms!FrmCopyRoutingMenu!TextTarget = Table!tblQuoteSection2Lines!tblQuoteMstrID Then
MsgBox ("Quote Section 2 Already Started! Please Copy Individual Sections.")
ElseIf Forms!FrmCopyRoutingMenu!TextTarget = Table!tblQuoteSection3Lines!tblQuoteMstrID Then
MsgBox ("Quote Section 3 Already Started! Please Copy Individual Sections.")
ElseIf Forms!FrmCopyRoutingMenu!TextTarget = Table!tblQuoteSection4Lines!tblQuoteMstrID Then
MsgBox ("Quote Section 4 Already Started! Please Copy Individual Sections.")
ElseIf Forms!FrmCopyRoutingMenu!TextTarget = Table!tblQuoteSection5Lines!tblQuoteMstrID Then
MsgBox ("Quote Section 5 Already Started! Please Copy Individual Sections.")
Else
欢迎来到Stack Overflow。发布您遇到的问题的错误消息是明智的。这将使用户能够确定发生了什么。 – Brian
运行时错误'424'对象要求 – Corey
我不认为你可以链接到这样的表。您将不得不用记录集对象打开表格并以这种方式抓取列。 – abraxascarab