Hi, I'm wondering if there is another way of doing what I wanted to happen. I have an object which have 4 properties. I assigned value on those properties.
Object Name: objEmployee
Property: EmpID, EmpFirstName, EmpMidName, EmpLastName
I need to manipulate the values assigned on each property. Currently, i'm manipulating the values using this code:Code:With objEmployee .EmpID = 12345 .EmpFirstName= "Russell" .EmpMidName= "Bell" .EmpLastName= "Champman" End With
What I wanted to happen is to manipulate those fields using a loop, something like this:Code:With objEmployee .EmpFirstName= Iff(IsNothing(.EmpFirstName), "Default Value", .EmpFirstName) .EmpMidName= Iff(IsNothing(.EmpMidName), "Default Value", .EmpMidName) .EmpLastName= Iff(IsNothing(.EmpLastName), "Default Value", .EmpLastName) End With
Is there any way to do it? Thank you in advance.Code:for i = 0 to 3 objEmployee(i).value = Iff(IsNothing(objEmployee(i).value), "Default Value", objEmployee(i).value) loop




Reply With Quote
