Locking formfields after update

T

Thronz

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
 
G

Greg Maxey

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top