Disallow edits based on criteria (1 Viewer)

torok

Registered User.
Local time
Today, 11:54
Joined
Feb 3, 2002
Messages
68
I've got a form that shows orders. An order has a field "invoice_number" that is null until that order has been put on an invoice.

What's the best way to disallow edits to that order record (and its subforms) ony if there is a value in that invoice_number field, so that orders cannot be edited after they've been put on an invoice?

Suggestions? I can think of a few ways, but there are probably better ones!

Thanks!
 

llkhoutx

Registered User.
Local time
Today, 13:54
Joined
Feb 26, 2001
Messages
4,018
I would lock the form based on the existence of an invoice number, that is,

On event "On Current", that is, every time the user moves to a new record add:

if nz([InvoiceNumber]) <> 0 then
me.locked=true
else
me.locked=false
end if
 

torok

Registered User.
Local time
Today, 11:54
Joined
Feb 3, 2002
Messages
68
I was right! There were better ways....

Thanks :)
 

Users who are viewing this thread

Top Bottom