March 27, 200124 yr 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!
March 28, 200124 yr 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
March 28, 200124 yr Author No, I mean 2 separate database files that are related by the invoice_id field.
March 29, 200124 yr 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
March 29, 200124 yr 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?
Create an account or sign in to comment