thanks alot. its working perfect.
thanks alot. its working perfect.
You are welcome. Good luck with your project.
My friend. Do you know of any code that can disable a database when the name of the company is changed on the startup form or when the database path is changed?
Thanks
Do you mean when the company name is changed in a control on the form such as a text box or combo box? If so, you can just close the database in the after update event of that control. (DoCmd.Quit) I'm not sure if that will do anything for you. You could just prevent the user from changing it by locking the control. (set the locked property to yes) Changing the path or location of the database is something that would have to be controlled outside of Access (If I understand what you mean).
Do you mean when the company name is changed in a control on the form such as a text box or combo box? If so, you can just close the database in the after update event of that control. (DoCmd.Quit) I'm not sure if that will do anything for you. You could just prevent the user from changing it by locking the control. (set the locked property to yes) Changing the path or location of the database is something that would have to be controlled outside of Access (If I understand what you mean).
Yes. if the text box is txtconame which displays the company name in frstart( which is my start up form),how should my code look like. or the macro look like.
Thanks
I gave you the code to quit which would close the database: DoCmd.Quit. It would go in the after update event of the control (text box). Now is the form a bound form (tied to a table or query)?
What exactly do you mean by disable the database? If you disable the database, it implies that the user cannot do anything. Could you please explain in more detail how the user is suppose to progress from the main form to do tasks in the database?...disable a database...