This sample code for disable menu Data – Employee when employee form activated and enabled when form Employee deactivated.

Create menu Master :

Click “Edit” and create submenu “Employee” :

Click Create button and write command :

DO FORM employee.scx

And save ( CTRL+W).

Then click Option button and put variable mnDataEmployee on ‘Skip For:”

Note: Variable must be declared on General Setup in menu Master :

PUBLIC mnDataEmployee as Boolean

STORE .F. TO mnDataEmployee

Save and Generate menu master.

Open form Employee and add code in :

FormLoad procedure :

mnDataEmployee = .T.

SET SKIP OF BAR 1 OF Data mnDataEmployee

FormRelease procedure :

mnDataEmployee = .F.

SET SKIP OF BAR 1 OF Data mnDataEmployee

Save and close form employee.

Run command with DO master.mpr

Advertisements