Link to home
Create AccountLog in
Avatar of Aleks
AleksFlag for United States of America

asked on

Replace value

I have the current code. The value passed is "Male" or "Female", but I need to change it to "1" or "2" accordingly.

This is my current code (Passes "Male" or "Female"

strXML2 = strXML2 & buildXML( "1petitionerdad.Gender" , rs_father_petitioner("Sex"), "" )

I am trying this:

     if rs_father_petitioner(campos(i)) = "Male" then
        strXML2 = strXML2 & buildXML( "1petitionerdad.Gender" , "1", "" )
        elseif rs_father_petitioner(campos(i)) = "Female" then
        strXML2 = strXML2 & buildXML( "1petitionerdad.Gender" , "2", "" )
     end if

But for some reason it is not working. Any ideas why ?
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

check what is needed for function: buildXML

and what's the value returned for: rs_father_petitioner(campos(i))

and use something like this:

 strXML2 = strXML2 & buildXML( "1petitionerdad.Gender" ,rs_father_petitioner(campos(i)) , "" )
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account