1 form data from different database

N

Neil

I created a form with several buttons, i am trying to incorporate in the
button wherein if i click the button, it will open a form in another database.

Will this be possible?

Please help me.

Thank you.
 
F

fredg

I created a form with several buttons, i am trying to incorporate in the
button wherein if i click the button, it will open a form in another database.

Will this be possible?

Please help me.

Thank you.

Adapted from VBA help on the OpenCurrentDatabase method.

You can use this as the code behind a Command Button Click event:

Public Sub OpenForeignForm()
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "C:\FolderName\DatabaseName.mdb"
appAccess.DoCmd.OpenForm "frmMaintain"

End Sub
 

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