I had another idea.
Instead of disabling the controls, you could save the Thread of the browse. When the user ACCEPTs the control,
CASE ACCEPTED()
?BrowseCustomer
IF BrowseCustomer_Thread
POST(EVENT:USER + X,,BrowseCustomer_Thread)
!You might succeed with
!POST(EVENT:GainFocus,,BrowseCustomer_Thread)
ELSE
BrowseCustomer_Thread = START(BrowseCustomer)
END
!etc
CASE EVENT()
OF EVENT:USER + Y
BrowseCustomer_Thread = 0
!Note: this would probably be cleaner with a NOTIFY
On the BrowseCustomer side
CASE EVENT()
OF EVENT:USER + X
0{prop:Active}=TRUE
!etc.
Prior to returning
POST(EVENT:USER + Y,,1)
Again, it's up to you to select the + X part of the Event:User + X I strongly recommend that you use an Equate, as in EVENT:USER_GAINFOCUS EQUATE(EVENT:USER + 42)
Also FWIW, I recommend using EVENT:APP instead of
event:user
Event:APP EQUATE(08000h)
Event:APP_LAST EQUATE(0BFFFh)
The link below tells you why....