G
Guest
Hi all
I'm hoping someone out there can help me with this. I have a form with a subform where once the record is "Finalized" i do not want to allow the user to go back and edit or delete the record. I have it so you can't edit the main form. But using the below code in the ONCurrent event for the subform records what happens is you cant edit any records whether the updateinv flag is true or false - I think because its finding true on some of the records so it makes the code below say no edits. What I need to do is for this Receipt only if the updateinv flag is true then don't allow edits. I've tried differtn ways but it either seems to make all records editable or all records not editable. How can apply the criteria to the below
I thought maybe trying to do it at the detail level of the record but I didn't see an appropriate event
Set dbs = CurrentD
Set rst = dbs.OpenRecordset("tblReceiptsLine"
blUpdateInv = rst.Fields("UpdateInv").Valu
If blUpdateInv = True The
Me.AllowEdits = Fals
Els
Me.AllowEdits = Tru
End I
Any help is appreciated
Set dbs = Nothing
I'm hoping someone out there can help me with this. I have a form with a subform where once the record is "Finalized" i do not want to allow the user to go back and edit or delete the record. I have it so you can't edit the main form. But using the below code in the ONCurrent event for the subform records what happens is you cant edit any records whether the updateinv flag is true or false - I think because its finding true on some of the records so it makes the code below say no edits. What I need to do is for this Receipt only if the updateinv flag is true then don't allow edits. I've tried differtn ways but it either seems to make all records editable or all records not editable. How can apply the criteria to the below
I thought maybe trying to do it at the detail level of the record but I didn't see an appropriate event
Set dbs = CurrentD
Set rst = dbs.OpenRecordset("tblReceiptsLine"
blUpdateInv = rst.Fields("UpdateInv").Valu
If blUpdateInv = True The
Me.AllowEdits = Fals
Els
Me.AllowEdits = Tru
End I
Any help is appreciated
Set dbs = Nothing