Macro wont work in protected form

S

stuck4once

can someone please help me on this:

I have created a form, that needs to be protected to enable to form field
settings to work and so that none of the other text can be deleted.
In this form I have created a click button macro so that when it is pressed
it automatically creates a "Order Number" and saves this document as that
order number.
The problem I am having is that when the document is protected to enable the
form field settings that macro won't work, is there something that I am
missing?

A fast response on this will be greatly appreciate :)

Many thanks

Arran
 
E

Edward Thrashcort

Could you insert the order number as a field which references a document
variable then user the macro to update that variable?

You can temporarily unset and reset the document protection with a macro.
To preserve the current values of the form fields, you may have to make
their current values the defaults before unprotecting the doc.

The best time to unprotect a form is before it holds any user data.

Eddie
 
S

stuck4once

I didn't do that in the end but thanks for your advice,

I ended up making the first part of the macro to unprotect the form then the
last past to re-protect it after it had put in the sequential number and
saved it.

Works perfectly
 

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