G
Guest
I am attempting to run SQL code which I have asssigned to a variable in VBA
environment.
Example :
Function MappingTable ()
Dim X as String
DIm Y as String
X = "SELECT A.ID ,A.CustName,A.OrderID,A.Amount ,IIF(...(IIF(...(IIF...)))
as OutputAnlaysis FROM PseudoTable;"
CurrentDB.CreatequeryDef "Analysis" , X
Y = "Select * INTO MappingTable;"
Docmd.RunSQL(Y)
End Function
=============
When I attempt to run code like above ,with the nested IIF statement ,the
function procedure doesn't work.
I then subsequently assigned the nested IIF statement into a string/variant
variable and concatenated it to the string variable with the rest on the SQL
code - no joy !
Can someone please help me with a solution or workaround?
Regards
SysAccountant
environment.
Example :
Function MappingTable ()
Dim X as String
DIm Y as String
X = "SELECT A.ID ,A.CustName,A.OrderID,A.Amount ,IIF(...(IIF(...(IIF...)))
as OutputAnlaysis FROM PseudoTable;"
CurrentDB.CreatequeryDef "Analysis" , X
Y = "Select * INTO MappingTable;"
Docmd.RunSQL(Y)
End Function
=============
When I attempt to run code like above ,with the nested IIF statement ,the
function procedure doesn't work.
I then subsequently assigned the nested IIF statement into a string/variant
variable and concatenated it to the string variable with the rest on the SQL
code - no joy !
Can someone please help me with a solution or workaround?
Regards
SysAccountant