VBA open DB

inteliits

New member
Local time
Today, 16:50
Joined
Apr 9, 2015
Messages
1
HI, this is my Code for Excel VBA.
Code:
Private Sub CommandButton2_Click()
Dim ac As Object
Dim str As String
Set ac = GetObject("", "Access.Application")
ac.OpenCurrentDatabase "C:\Users\Janis\Desktop\db.accdb"
ac.DoCmd.OpenForm "Pacienti"
ac.UserControl = True
Set ac = Nothing
End Sub

After click on button show up Access database. But i wonder if is possible to be visible on that access form to see only that form, not all other tables/forms and utt...
 

Users who are viewing this thread

Back
Top Bottom