Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Locking formfields after update

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thronz - 28 Feb 2007 19:06 GMT
I am working on a project which includes an approval process.
The process is called from an Access form and utilizes Outlook's 'Assign
Task' function. The code I have written starts when a Command button on the
Access form is clicked. It opens a Word document, enters data from the Access
form to three text fields in the document, then renames (using data from
those textboxes) and saves the document.  I then have a 'task' assigned to
the next person in the approval process (the document is added as an
attachment), who opens the attachment, enters their info, crtl+s to save it
and assigns the task to the next person in the process. Repeat twice.

What I want to know is:
     Is it possible to lock formfields (I have 2 textboxs [1 for Username
and 1 for Date] and a checkbox for each step in the process) to prevent any
changes once the document is saved?

I have searched the Discussion Group and Googled but didn't find my
scenerio......
thanks in advance, you people are a GREAT resource!
Stu
Greg Maxey - 28 Feb 2007 19:35 GMT
Thronz,

Set their enabled property as part of your update procedure:

Sub Test()
Dim oFF As Word.FormFields
Set oFF = ActiveDocument.FormFields
oFF("Text1").Enabled = False
oFF("Text2").Enabled = False
oFF("Check1").Enabled = False
End Sub

> I am working on a project which includes an approval process.
> The process is called from an Access form and utilizes Outlook's 'Assign
[quoted text clipped - 15 lines]
> thanks in advance, you people are a GREAT resource!
> Stu

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.