I have an invoicing database. I have a yes/no field "Invoiced", which is checked after an invoice is issued. I want to lock the other fields after this is ticked. As a minimum, I want to lock the "Invoice ID" field so costs can't end up on two invoices.
I only enter data through a form, so I'm thinking that locking the text box on the form is probably sufficient (just trying to prevent accidental overwrites, rather than create huge security barriers).
I'm thinking the code I need is an after update:
if [Invoiced] is yes then [invoiceID] is disabled
if [Invoiced] is no then [invoiceID] is enabled.
But I don't know how to actually write that. Appreciate your help.
----
I do actually know how to write the code above (duh), but realise now it won't work, 'cause my list of costs show in a datasheet view and [invoiceid] on every record is disabled.
I really just want to be able to lock down single records against change.
I only enter data through a form, so I'm thinking that locking the text box on the form is probably sufficient (just trying to prevent accidental overwrites, rather than create huge security barriers).
I'm thinking the code I need is an after update:
if [Invoiced] is yes then [invoiceID] is disabled
if [Invoiced] is no then [invoiceID] is enabled.
But I don't know how to actually write that. Appreciate your help.
----
I do actually know how to write the code above (duh), but realise now it won't work, 'cause my list of costs show in a datasheet view and [invoiceid] on every record is disabled.
I really just want to be able to lock down single records against change.
Last edited: