Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh form when opened for edit

Status
Not open for further replies.

claytonjgordon

Technical User
Jul 21, 2004
37
0
0
US
This is what I want to happen.

The form opens and several fields are manual entry for the user. When its all filled out correctly, they hit a save type button that saves the form and sends it to the next level to continue. When it gets there, the status changes from "new" to "escalated" and all the fields the first guy filled out need to be locked to prevent the second guy from changing them.

I'm trying to avoid using the hide when method, so I'm using the Input enabled method instead.

In the input enabled method of each of these fields, I have
Code:
Status = "New"

My problem is that the field only disables after the focus passed the field, unless the page is refreshed. If I pull up the form, put it in edit mode, and then hit F9 to refresh, I get the desired result; but I can't seem to make it refersh automatically.

I've tried using the @Command( [ToolsRefreshAllDocs] ) in the PostModeChange field property as well as every other field property but it gives me an error msg since this method is before the initial focus.

I thought I might be able to set the focus with:
@Command( [EditGotoField] ; LaterFieldName);
But that gets the same error.

Any idea how I can trigger a refresh which will in turn lock the fields prior to the user getting focus thus preventing them from changing the fields?


Dominus Nihil
(Master of Nothing)
 
Um, shouldn't you be setting the status to "escalated" upon the save ?
Since the document is no longer in the hands of the user at that point, I fail to see why you need this elaborate scheme.
And why bother with Input Enabled ? Just put the fields that are not supposed to be edited anymore in a subform. Load the editable subform for the initial user, and the read-only subform for the escalation.

That said, refreshing fields should basically be done in the Post Open event, with a basic formula like
Code:
@If(@IsDocBeingEdited;@Command([ViewRefreshFields]);"")
.
Unfortunately, you're going to need to be aware of these problems if you continue to use Input Enabled formulas.

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top