Database Reference
In-Depth Information
your custom dialog box when the script step runs. In that case, the user can replace the re-
cord's existing data by typing in the custom dialog box.
Understanding the Commit Data Option
The Commit Data option is a little deceptive because it actually performs two tasks. First, it
enters data the user has typed into the fields you've specified and then, if the record was
not
open
when the script step runs, it commits the record. But if the user is in the middle of en-
tering data when she runs your script, or if your script step contains an
Open Record/
Request
step that runs before the
Show Custom Dialog
step, the data is entered into the
fields, but the record is not committed.
When you're creating simple custom dialog boxes, where the user clicks the OK button, or
makes a choice between two or three buttons, you'll almost always turn off all the Commit
options under your buttons.
When you're creating a custom dialog box with input fields, you'll need to decide which but-
ton gets a Commit Data option. If the default button cancels your data input dialog box, turn
off Button 1's Commit Data option. If Button 2 is the button the user clicks after he's entered
data, then turn on its Commit Data option (
Figure 17-6
).