I'm trying to pass a variable in an If statement within a recordset. If I explicitly enter the variable value, the code works fine. I've tried several variations to try and properly reference the variable 'App1'. Here's my latest snippet of code that shows my problem:
With rst
If ((Application = " ' & App1 & ' ") Or _
(doc.FormFields("DropDown7").Result = " ' & App1 & ' ") Or _
(doc.FormFields("RBITApp1").Result = " ' & App1 & ' ") Or _
(doc.FormFields("RBITApp2").Result = " ' & App1 & ' ") Or _
(doc.FormFields("RBITApp3").Result = " ' & App1 & ' ")) Then
Am I missing a double quote or single quote somewhere?
With rst
If ((Application = " ' & App1 & ' ") Or _
(doc.FormFields("DropDown7").Result = " ' & App1 & ' ") Or _
(doc.FormFields("RBITApp1").Result = " ' & App1 & ' ") Or _
(doc.FormFields("RBITApp2").Result = " ' & App1 & ' ") Or _
(doc.FormFields("RBITApp3").Result = " ' & App1 & ' ")) Then
Am I missing a double quote or single quote somewhere?