What version of filemaker are you using?
You can use security settings to conditionally lock a record against editing.
If you are using filemaker 10 or 11 you can set a OnObjectEnter script trigger on the field to deny entry to the field. That's not as secure an approach as setting up record level access privileges, but it's also easier.
If not in v10, you can also validate the Order Quantity field (or whatever you want to call it) by doing the following:
Manage Database, select the field and click on options. then the VALIDATION tab.
Select Validation by Calculation. you can enter a formula such as "Self" ≤ "Items_Table::Item_inventory" (whatever the name of your related table and inventory field is....) This will return a Boolean result.
then you can enter the message you'd like your users to see/read: "sorry, we don't have that quantity available, etc."
Thanks for your responses.
If you are using filemaker 10 or 11 you can set a OnObjectEnter script trigger on the field to deny entry to the field.
I'm using Filemaker Pro 11. I have managed to automatically set the quantity to 1 for 'one-off' items using OnObjectExit on 'ItemType' field. What function do I use in my script to deny entry to the quantity field.
OnObjectEnter for that field.
You write a script that checks to see if entry is permitted, if not, use go to field to place the cursor in a different field.
Note that this approach is not as secure as setting up record level access permissions in Manage | Security
I will use the script technique for now and build something more robust later. Didn't occur to me just to go to next field. I feel a little embarassed now.