Hi
Can anyone tell me what is wrong with the following?
IF gi_Grandparent <> 0 THEN
gi_Parent = gi_Grandparent
gi_Grandparent = 0
InitialiseButtons()
ELSE IF gi_Parent <> 0 THEN
gi_Grandparent = 0
gi_Parent = 0
InitialiseButtons()
ELSE
IF TableCount(Table1) = 0 THEN
Close(MyWindow,"")
ELSE
Error("Current Transaction must be completed first")
END
END
ReturnToCapture(ctl_item)
When I run this, it always runs the last ELSE code,after running the correct code. For example if gi_parent = 3 it runs that section but then also runs the "IF TableCount etc" Running it through the debugger it works correctly so I thought maybe a delay might help but that didn't solve it. I originally had them as 3 separate IF statements with a ReturnToCapture at the end of each one but when that didn't work I tried the above. I've removed the call to InitialiseButtons in case I had something happening there and I've tried deleting the CPL folder and recompiling but still get the same issue.
Thanks
David
Edited 1 time(s). Last edit at 12/28/2008 11:29AM by David Egan.