Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Software (https://www.askmehelpdesk.com/forumdisplay.php?f=394)
-   -   "Form" placed in "Microsoft Access" can be accessed from a "Button" in "VB.Net" App (https://www.askmehelpdesk.com/showthread.php?t=487519)

  • Jul 12, 2010, 05:01 AM
    sheraz04
    "Form" placed in "Microsoft Access" can be accessed from a "Button" in "VB.Net" App
    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
  • Jul 14, 2010, 09:47 PM
    sheraz04

    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.

  • All times are GMT -7. The time now is 07:19 PM.