I'm having a bit of a problem calling an procedure on a
Microsoft Access Form from an Excel Form. I've created the
Access object, opened the database containing the form,
displayed the form, autofilled some textboxes, but I can't seem
to get the correct syntax to call one of the access form's
procedures. This is what I have so far:
I have an Access form called InputData
It has a textbox called txtData
From within an Excel form I have this code:
Dim appAccess As Object 'Microsoft Access database object
'Create an instance of Microsoft Access
Set appAccess = CreateObject("Access.Application"
With appAccess
'Open the database "ABC.mdb"
.OpenCurrentDatabase "C:\My Documents\ABC.mdb"
'Open the "InputData" form.
.DoCmd.OpenForm "InputData"
.Forms![InputData]!txtData.SetFocus
.Forms![InputData]!txtData.Text = "Demo Data"
'Call Procedure "StoreData" on Access Form "InputData"
HELP!
End With
Microsoft Access Form from an Excel Form. I've created the
Access object, opened the database containing the form,
displayed the form, autofilled some textboxes, but I can't seem
to get the correct syntax to call one of the access form's
procedures. This is what I have so far:
I have an Access form called InputData
It has a textbox called txtData
From within an Excel form I have this code:
Dim appAccess As Object 'Microsoft Access database object
'Create an instance of Microsoft Access
Set appAccess = CreateObject("Access.Application"
With appAccess
'Open the database "ABC.mdb"
.OpenCurrentDatabase "C:\My Documents\ABC.mdb"
'Open the "InputData" form.
.DoCmd.OpenForm "InputData"
.Forms![InputData]!txtData.SetFocus
.Forms![InputData]!txtData.Text = "Demo Data"
'Call Procedure "StoreData" on Access Form "InputData"
HELP!
End With