P
pete.trudell
Afternoon, I posted this same topic to the Outlook97 forum, but thought
I could also get help from this forum.
Several years ago I designed an Outlook 97 form which when sent to our
Manger , gave the manager the option to forward it to another
Department or click on a button to send specific data from the form to
our Centerwide Access 97 Database. All worked fine, until recently
when we upgraded to Office 2003.
Now the form does nothing when the button is clicked.... no error,
nothing. And the data is nor collected by the Database.
So I need some advise as to design an all new form using InfoPath, or
twik my present form to work in Office 2003.
Here is my code:
Sub ProcessButton1_Click()
' VB Script for Claims Notification Forms
' 07/27/04 by P.Trudell
' Database objects
Dim rst
Dim dao
Dim wks
Dim db
' Form Objects
Dim DateRec
Dim SSN
Dim Remarks
Dim BackDated
Dim ReIssue
Dim ReturnWk
Dim RWDate
' Oject Controls
Dim objPage
Dim objControls
Set objPage = Item.GetInspector.ModifiedFormPages("Message")
Set objControls = objPage.Controls
Set SSN = objControls("SSN")
Set Remarks = objControls("Remarks")
Set Sender = objControls ("Sender")
Set BackDated = objControls ("BackDated")
Set ReIssue = objControls ("ReIssue")
Set ReturnWk = objControls ("ReturnWk")
Set RWDate = objControls ("RWDate")
Set dao = Application.CreateObject("DAO.DBEngine.35")
Set wks = dao.Workspaces(0)
Set db = wks.OpenDatabase("\\our server\our database.MDB")
Set rst = db.OpenRecordset("reissue")
rst.AddNew
rst.SSN = SSN.Value
rst.BackDated = BackDated.Value
rst.ReIssue = ReIssue.Value
rst.ReturnWk = ReturnWk.Value
rst.RWDate = RWDate.Value
rst.From = Sender.Value
rst.Remarks = Remarks.Value
rst.Update
MsgBox "Update Complete."
rst.Close
db.Close
End Sub
Appreciate any help. Thanks
I could also get help from this forum.
Several years ago I designed an Outlook 97 form which when sent to our
Manger , gave the manager the option to forward it to another
Department or click on a button to send specific data from the form to
our Centerwide Access 97 Database. All worked fine, until recently
when we upgraded to Office 2003.
Now the form does nothing when the button is clicked.... no error,
nothing. And the data is nor collected by the Database.
So I need some advise as to design an all new form using InfoPath, or
twik my present form to work in Office 2003.
Here is my code:
Sub ProcessButton1_Click()
' VB Script for Claims Notification Forms
' 07/27/04 by P.Trudell
' Database objects
Dim rst
Dim dao
Dim wks
Dim db
' Form Objects
Dim DateRec
Dim SSN
Dim Remarks
Dim BackDated
Dim ReIssue
Dim ReturnWk
Dim RWDate
' Oject Controls
Dim objPage
Dim objControls
Set objPage = Item.GetInspector.ModifiedFormPages("Message")
Set objControls = objPage.Controls
Set SSN = objControls("SSN")
Set Remarks = objControls("Remarks")
Set Sender = objControls ("Sender")
Set BackDated = objControls ("BackDated")
Set ReIssue = objControls ("ReIssue")
Set ReturnWk = objControls ("ReturnWk")
Set RWDate = objControls ("RWDate")
Set dao = Application.CreateObject("DAO.DBEngine.35")
Set wks = dao.Workspaces(0)
Set db = wks.OpenDatabase("\\our server\our database.MDB")
Set rst = db.OpenRecordset("reissue")
rst.AddNew
rst.SSN = SSN.Value
rst.BackDated = BackDated.Value
rst.ReIssue = ReIssue.Value
rst.ReturnWk = ReturnWk.Value
rst.RWDate = RWDate.Value
rst.From = Sender.Value
rst.Remarks = Remarks.Value
rst.Update
MsgBox "Update Complete."
rst.Close
db.Close
End Sub
Appreciate any help. Thanks