ncasares Posted March 27, 2001 Posted March 27, 2001 I would like to lock one of my DB files so that a new record can ONLY be created by running a script in another file? I would like to do this to avoid DUPLICATE join files. Here is my setup: I have 3 files: an invoice file, a payment entry file, and a payment items file. The Invoice and payment files are reltated by the key field "invoice_id". The payment entry and payment item files are related by the key field "payment_id". A script in the Invoice file copies the value of "invoice_id" into a global and takes the user to the payment entry file. Another script creates a new record and pastes the global into the payment "invoice_id" field. This keeps the invoice_id constant in each of my files (Is this the worng way?). I am using an IF-ELSE validaiton script to keep the user from creating a duplicate from the script entry in the Invoice file. However, a user could still press "Command-N" and manually create a new record in the payments file. Since they didn't use the script, the validation doesn't run and I end up with two files with the same "invoice_id". Maybe I'm approaching this the wrong way. Any help is GREATLY appreciated. Thanks!
LiveOak Posted March 28, 2001 Posted March 28, 2001 You need to create a user password with the "Available Menu Commands:" setting set to "None". With this accomplished, the only way a user has to create a new record is to run a script. I'm guess that when you say "files" you really mean "records" ("two files with the same invoice_ID"). In database design this is like mixing up the terms "asprin" and "cyanide" in medicine! . -bd
ncasares Posted March 28, 2001 Author Posted March 28, 2001 No, I mean 2 separate database files that are related by the invoice_id field.
LiveOak Posted March 29, 2001 Posted March 29, 2001 The approach is the same. Eliminate menu commands and force the user to create new records only with a script (command-N doesn't exist). The script can then validate an operation to the level you desire. -bd
Tomo1 Posted March 29, 2001 Posted March 29, 2001 Why do you need to create new record via script, why not set up the group password with The pref password set up to allow or not to allow creation of records?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now