I am a beginner in macro-programing in BASE and have a seemingly trivial problem which I cannot solve and cannot find discussed elsewhere in this forum. I would therefore appreciate any help the forum can give me.
I wish to write a macro which opens a form and changes the status of a field in that form. In particular I have a form (Form A) which contains two press buttons (A1 and A2). Associated with each button is a macro (M1 and M2 respectively), both of which open a second form (Form B) which contains a press button (B1). Up to this point I have written code that works. But what I cannot do is the following: the code of M1 and M2 must differ because M1 should enable the button B1, whilst M2 should change the background color of B1 (from say. Gray2 to Cyan or a different RGB Hex code) and should dis-enable B1 so that it cannot be pressed. Can someone tell me what this code difference should be?
As Form B can only be reached from the two buttons on Form A I presently do not have to convert the enabled/dis-enabled status of B1 back to a default value when Form B is exited, but it would be nice to know how this might be achieved if required in the future!