I am working on a project that logs temperature readings, all is working well except i need to put a block on a field named [1st reading] so that it can be changed one time then it is locked.
The field is already populated in table as part of a batch append query with 0.0 as the reading. It must be allowed to be changed one time.
The Field Name is [1st Reading] on the form [log]
The field is named [1st Reading] in the Table [Data]
My thought is to create a field named [lock] on the table [Data] to control this
My thinking is that when a user goes to change data in the form the [1st Reading] field it will trigger the "on dirty" event to look to see if the
[lock] field is null. If it is it will allow the change and also do a "send value" command to enter "L". in the [lock] field of the table.
The next attempt to enter data in the [1st Reading] Field the routine will see the "L" value and will not allow a change and will present a message saying "this field is locked for editing"
How do I do this?
i can see a simple if then and send value command but I dont know how to do the if [lock] is null allow value and send the "L" value
or the if [lock] is not null send message.
Is there a better way?
FYI the allow additions and dont allow edits wont work because the field is pre-populated with a value populated with a value