Handling Access events in .net

J

Jake

I asked this in the Access forum and got no responce so I decided to ask here:

I am running an access application inside of a .Net wrapper program using an
Access.Application object.

In this context is it posible to handle Access events (such as the "Click"
event of a command button) with code in the host application?
 
C

Cindy M.

Hi Jake,
I asked this in the Access forum and got no responce so I decided to ask here:

I am running an access application inside of a .Net wrapper program using an
Access.Application object.

In this context is it posible to handle Access events (such as the "Click"
event of a command button) with code in the host application?
Where would this "command button" be located?

If we're talking about toolbars, then yes; buttons on forms, probably not.
Controls on Forms in Office are strongly linked to VBA modules.

I admit to being somewhat puzzled as to why you'd embed Access when you could
create the interfaces "simply enough" in your .NET form. Excel, Word... Yes. But
a database?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
J

Jake

Cindy,

I could do most of what I am after using toolbars. How would I go about that?

Jacob
 
C

Cindy M.

Hi =?Utf-8?B?SmFrZQ==?=,
I could do most of what I am after using toolbars. How would I go about that?
This KB article describes how to create CommandBars in an Office application
and link them to an event handler using VB.NET:
http://support.microsoft.com/kb/303017/en-us
using C#
http://support.microsoft.com/kb/303018/en-us

I have no idea what the differences would be doing this for an embedded
application object, but as long as you've got the application object and the
correct references I'm guessing it shouldn't be a problem.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
J

Jake

THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU!

Cindy,

This is wonderfull. You've no idea how much you have made my life easyer
over the next year or two.

In your first post on this topic you wrote: "I admit to being somewhat
puzzled as to why you'd embed Access when you could create the interfaces
'simply enough' in your .NET form. Excel, Word... Yes. But a database?"

I am working with a large and complex application that was writen before
my arival on the scene. It is currently writen in Access but I want to
transition to using VB without spending 6 months writing the client from
scratch (which my boss would never let me take the time to do anyway). Being
able to trigger VB code from within Access means that I can transition the
application slowly from Access to VB until everything is in VB and I can
eliminate the Access file entierly.

Thank you again.

Jacob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top