Hello Bharat,
1: It does work with a variable and with a text value but you have to be sure to write it correctly. Let's take the following code
vCode = "TestCode"
vSecondPart = "ImmR = " + vCode
When executed vSecondPart is going to equal
Quote:ImmR = TestCode
If you were to copy that into the programming editor of your Physical form and test it, it would throw an error saying it doesn't know what TestCode is. The same is gonna hold true for FormRunCustomProgram() it can't compile as it doesn't know what TestCode is. However,
Quote:ImmR = "TestCode"
Will compile, so that is what we need to generate. That means our code needs to be
vCode = "TestCode"
vSecondPart = "ImmR = """ + vCode + """"
The reason it is working with numbers is because Sesame knows what 1000 is.
as for #2 and #3, I would have to see the behavoir in person to determine why it is doing what it is doing. Once you start mixing On Form Reveal with commands that Open or Close other forms, or even switching to other forms there gets to be a lot going on.
-Ray