Skip to main content

Variable declared as Double not recognized in formula

 
Hi All,
In my piece of code I declare value for IPT rate and then use that variable in the formula (contain within criteria of my IPT_Validation function) however it fails claiming the equation is bad.
CODE:
Function IPT_Validation(MasterDb As Object, UserChoice() As String)
Dim IPTRate As Double
IPTRate = 0.125
'Extracting all data
Set TargetDb = MasterDb
Call Extraction_All_And_Export(TargetDb, "Unusual IPT rate", "@Abs(" & UserChoice(8) & ") <>0.125")
End Function
It only works with value 0.125 in the criteria formula and not with the IPTRate variable declared at the top of the fuction.
How can I twick it please?
 

Brian Element Wed, 07/04/2018 - 09:34

What was your original equation that wasn't working?

Here is the equation that works for me based on your variables:

"@abs(" & UserChoice(8)  & ") <> " & IPTRate

Pawelski_33 Wed, 07/04/2018 - 11:12

Ace.Thanks Brian
My previous version was missing apersand:
Call Extraction_All_And_Export(TargetDb, "Unusual IPT rate", "@Abs(" & UserChoice(8) & ") <>" IPTRate) ...
 
 

The website encountered an unexpected error. Try again later.