Hi Everybody,
I run the following code to create a database:
Create DataBase MyDatabaseFile
Then, I create the tables in the database
At last I closed the tables and do the following commands to close the database as well:
If dbused(MyDaraBasefile)
Close Databases
EndIf
Then, comes the following command.
ThisForm.MyOCX.LoadTables()
The very last command is an OCX control routine. I am accessing the Database in that OCX control.
Well, it works, but sometimes the OCX can not open the database. It seems that before the database and tables get closed, ThisForm.MyObject.LoadTables() executes.
Does any body know how I may keep “ThisForm.MyObOCX.LoadTables()” waiting till all the tables and databes are closed. In other words, I would like to do the above commands in a sequence.
Thank you,
Ali