A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Converting Outllok97 Form to Outlook 2003



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 30th 06, 08:42 PM posted to microsoft.public.outlook.program_forms
pete.trudell@twc.state.tx.us
external usenet poster
 
Posts: 4
Default Converting Outllok97 Form to Outlook 2003

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

Ads
  #2  
Old May 30th 06, 09:03 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Converting Outllok97 Form to Outlook 2003

If the form doesn't run code after you have sent or saved an item using the published form, you probably have done something to "one-off" the form. Outlook 2003, Outlook 2002, Outlook 2000 SP2 and Outlook 2000 or 98 with the Email Security Update will not run code on one-off forms; see http://www.outlookcode.com/d/secforms.htm for more information on this issue.

To ensure that a form does not one-off:

-- Make sure the "Send form definition with item" box on the (Properties) tab of the form is *not* checked. [1]

-- For in-house corporate use with Exchange Server, publish the form to the Organization Forms library or a public folder's forms library, as appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal Forms library. Save it as an .oft file and send it to other people who need to use it with instructions to publish it with the same form name that you used.

Many other things can cause one-off forms. If the above steps don't work on a new item created with your form, see http://www.outlookcode.com/d/formpub.htm#oneoff for other possible causes.

[1] Whenever you publish a message form, Outlook will suggest that you may want to check the "Send form definition with item" box to ensure that the recipient will have the form, especially if you're sending to someone via the Internet. In the current Outlook security environment, this suggestion is obsolete. Ignore it unless your form has no code behind it.


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message ups.com...
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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting one outlook contact form to another outlook contact form tylerw@charter.net Outlook - Using Forms 3 May 10th 06 05:57 PM
OutLook 2002 - Converting all Incoming E-mail to Plain Text Allan C Outlook - General Queries 2 March 16th 06 04:16 PM
Converting iCal (mac) .ics files to Outlook .vcs files Adam Outlook - General Queries 0 March 10th 06 07:40 PM
Converting Palm .dba files Ridaher101 Outlook - Calandaring 1 January 21st 06 04:58 PM
Converting messages from HTML to Plain Text MadMaxx Outlook - Installation 1 January 10th 06 05:12 PM


All times are GMT +1. The time now is 07:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.