How do I host a WPF control on a VBA MS Access form?

We have a large MS Access project requiring GUI functionality that is difficult or impossible to do in a VBA / Access forms environment.

Over time, we want to rewrite / migrate to a managed C # environment with WPF as the presentation layer.

The only practical way to do this is for a longer period of time - to convert some of the VBA forms first (which will give the maximum performance benefit) and then convert the entire system within 12-24 months.

What do you think is the best approach. Can MS Access host WPF forms when converting them?

+1


source to share


2 answers


What if you look at Visual Studio Tools for Office (VSTO)? You can write Managed .NET Office Add-ons in C # that will integrate into the Office Ribbon.

Now the problem is that Access add-ins are not supported in VSTO AFAIK. But look here , it's not so impossible.

So if you're lucky you can



  • Write a C # Access Ribbon where you need all the advanced GUI.
  • Write services in C # that can be accessed from Access to encapsulate important business logic, for example, so that you can gradually move not only the GUI, but also create the correct domain object model in C #.

If you decide to give it a try, let me know how it turned out :) Anyway, good luck.

PS Anything else that might be helpful? Access 2007 Developer Extensions (ADE)

+3


source


Thanks badbadboy - I'll definitely be experimenting with this (using VSTO).

the solution you suggested to VSTO to work with ms access seems to be a bit of a hacker - not that I am against it, but I am nervous about using this work in production if it is not solid i.e. there is no support from MS.

From what I can see , this will allow me to host a winforms control, which in turn hosts a WPF control.



Has anyone gone this route with a production system - any caveats?

Note that there is a VSTO access project template at codeplex, which makes the process easier.

+1


source







All Articles