Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

MS Visual Basic Question

  • 14-04-2005 6:46pm
    #1
    Moderators Posts: 5,580 ✭✭✭


    We are trying to open an access report through vb application. We already have bits and peices of code but the declaration of the object does not work(access.application). How exactly do you declare an access database as an object in vb.


    Another way of sloving this problem is opening up an access form with a button.How do you do this. Need to use a frame or code or both?


Comments

  • Closed Accounts Posts: 5,284 ✭✭✭pwd


    Why not use vba?


  • Closed Accounts Posts: 92 ✭✭tempest


    Azza wrote:
    We are trying to open an access report through vb application. We already have bits and peices of code but the declaration of the object does not work(access.application). How exactly do you declare an access database as an object in vb.


    Another way of sloving this problem is opening up an access form with a button.How do you do this. Need to use a frame or code or both?

    Post a couple of lines of code please.

    Dim accessApp As Object
    Set accessApp = CreateObject("Access.Application")
    accessApp.Visible = true
    creates the object dynamically.

    Dim accessApp As Access.Application
    Set accessApp = New Access.Application
    accessApp.Visible = true

    creates the object statically but requires the object to be in the Project -> References section.

    This performs better and gives you autocomplete when you are developing.


Advertisement