I have a form with a command button. At the moment when I click the button it inserts text from the form onto another form. This all works fine.
I am now looking to extend the functionality of adding an IIF statement to this button so that I can use this one form to insert text to many different places based on a value.
My Problem
When I try to code the button with the IFF statement it says:
"Expected: line number or label or statement or end of statement" and it highlights the = sign at the beginning.
This is the code
=Iif([txt1] = "c", Forms![frmCompany]![C_Address1] = [Address1],"")
Any help please?
I am now looking to extend the functionality of adding an IIF statement to this button so that I can use this one form to insert text to many different places based on a value.
My Problem
When I try to code the button with the IFF statement it says:
"Expected: line number or label or statement or end of statement" and it highlights the = sign at the beginning.
This is the code
=Iif([txt1] = "c", Forms![frmCompany]![C_Address1] = [Address1],"")
Any help please?