Can a button be programmed to save current record and make it read only to prevent editing of data in that record. This would be useful so that I can close out a certain record (work order) for a customer.
Thanks,
billgyrotech
Can a button be programmed to save current record and make it read only to prevent editing of data in that record. This would be useful so that I can close out a certain record (work order) for a customer.
Thanks,
billgyrotech
Last edited by billgyrotech; 08-09-2011 at 02:03 PM.
There would need to be some way of identifying the record to prevent it from being edited. Some would use a status field, or perhaps a closed date (no date means okay to edit). Basically you'd set the allow edits property of the form behind your button and in the current event of the form.
I do have a finished date field. How do I make it work?
Along the lines of
Code:If IsDate(Me.FinishedDate) Then Me.AllowEdits = False Else Me.AllowEdits = True End If
I put the code under the DatePickedUp field On Exit Event Procedure but it didn't work. What am I doing wrong?
No idea, since I don't know what "didn't work" means. Error, wrong result, or ?
I'd have it in the after update event of the control, and the current event.
I have the file attached. On the subform Workorder there is a DatePickedUp field that I tried to enter the code, but it doesn't make the data read only on the form for the current record.
Last edited by billgyrotech; 08-09-2011 at 03:13 PM.
I'll try to look at it tonight. I only have 2000 on this machine and I turned off my laptop with VM's for other versions on it. Heading out to see a movie with my daughter anyway.
Thanks for any help! Have a great night!