I would like to be able to manipulate a form in a remote database. I want to set a bunch of controls on the form to the correct paramaters and then click a button on the form which runs a report. HEre's what I have so far. Everything works except for the !stdgo_click, which is intended to trigger the code in the on-click event of the stdgo command button.
I am thinking this has something to do with the public/private settings a references. How do I make this work?
Using Access 2002
Function PrintReports()
Dim DB As DAO.Database, appAccess As Access.Application
Set appAccess = CreateObject("Access.Application")
' Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase pcainternal_fe
With appAccess.Forms("PCAINternalswitchboard")
!selectclear.Value = 2
!smtpareto.Value = True
!stdHardCopy.Value = False
!dailyweekly.Value = 1
!HardCopy = !stdHardCopy
!Noun.Enabled = False
!PartNumberToggle = 0
!PartNumber.Enabled = False
!RefDesToggle = 0
!RefDes.Enabled = False
!RepCodeToggle = 0
!RepCode.Enabled = False
!InspectPoint.Enabled = False
!InspChoice.Value = 1
!RespChoice.Value = 3
!Value.Enabled = True
!DivisionToggle = 0
!Division.Enabled = False
!stdgo_click
End With
End Function
I am thinking this has something to do with the public/private settings a references. How do I make this work?
Using Access 2002