Log in

View Full Version : "Form" placed in "Microsoft Access" can be accessed from a "Button" in "VB.Net" App


sheraz04
Jul 12, 2010, 05:01 AM
Hi All,


Actually, I'm not very well in programming but a task is assigned to me related to .Net.


Basically, there is a database in Microsoft Access. I have made forms in it which are based on queries to retrieve required results. I have also made graph of it.

Now, I have to merge this database with other .Net Application. I want that instead of making queries and graphs using VB.Net once again. I simply want to call form of Access from a Button in .Net and all other work done by form in Access would be same as I done it earlier.

I hope, everybody uinderstands what I want. Your help will be really apprecited.


Regards

Sheraz

sheraz04
Jul 14, 2010, 09:47 PM
I have done it using the code below


Dim accessApp As Object

Set accessApp = CreateObject("Access.Application")
accessApp.OpenCurrentDatabase ("C:\Documents and Settings\Albert\My
Documents\Access\ScriptExample\MultiSelect.mdb")
accessApp.Visible = True
accessApp.DoCmd.OpenForm "unboundcheckbox"


this code opens the Form but immediately closes it.




Your help will be appreciated.