B
brett
I've created an Access add-in that creates a command button and is
supposed to show the name of the current database in a text box (to
make sure I can do it).
No problems with creating the command buttons, and the application
object is of type Access.Application - the application object is cast
as applicationObject = (Access.Application)application;
The code below works ok, but once run, Access refuses to unload. The
add-in unloads ok (the buttons are gone), but Access keeps popping up
and has to be killed from the task manager.
private void MyButton_Click(CommandBarButton cmdBarbutton,ref bool
cancel)
{
string msg = applicationObject.CurrentDb().Name.ToString();
System.Windows.Forms.MessageBox.Show(msg);
}
Anyone have any ideas what I'm missing?
thanks
Brett
supposed to show the name of the current database in a text box (to
make sure I can do it).
No problems with creating the command buttons, and the application
object is of type Access.Application - the application object is cast
as applicationObject = (Access.Application)application;
The code below works ok, but once run, Access refuses to unload. The
add-in unloads ok (the buttons are gone), but Access keeps popping up
and has to be killed from the task manager.
private void MyButton_Click(CommandBarButton cmdBarbutton,ref bool
cancel)
{
string msg = applicationObject.CurrentDb().Name.ToString();
System.Windows.Forms.MessageBox.Show(msg);
}
Anyone have any ideas what I'm missing?
thanks
Brett