How to avoid repeated program execution? (Detect whether there is a previous copy, and if so, end the currently newly started program). After starting a program, users sometimes narrow the program to the taskbar, and then restart the program when they need to use it. This sometimes causes data corruption in database programs! If you do not want users to launch the program repeatedly, you can use the APP object to determine as follows:
PRivateSubForm_Load()
IfApp.PrevInstanceThen'View previous version
MsgBox"This program is already running!",48
End
EndIf
EndSub->