フォームフィールドを使用してテーブルの列の値をチェックして、これを実行するクエリを事前認定しようとしていますが、実行しているコードですエラー。VBAでif、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
ようこそスタックオーバーフロー。問題が発生したときに表示されるエラーメッセージを投稿することをお勧めします。これにより、ユーザーは何が起こっているのかを判断することができます。 – Brian
実行時エラー '424'オブジェクトが必要です – Corey
このようなテーブルにリンクすることはできません。レコードセットオブジェクトでテーブルを開き、そのように列を取得する必要があります。 – abraxascarab