This is driving me insane so if anyone can help that would be great
I have a form which I open in acedit mode which then based on the record and user logged in I have a Dlookup which sets the value of an unbound control. The value of this control then determines if the record is editable or not but it doesn't work as the record is still not updatable
The code below is in the form's current section
'this sets the unbound control on my form to either 1 or 0
The record is editable as the unbound control is set to 1
Me.Edit_or_Read_Only = 1
'if [Building] is not "TBA" then the record may be editable as the unbound control is set to 1 or 0 depending on record and user name
'The above element of the code works fine
If [Forms]![Work Input Form]![Building] <> "TBA" Then Me.Edit_or_Read_Only = DLookup("[Count]", "Work Input Form Edit or Read Only Q3", "")
If Me.Edit_or_Read_Only = 1 Then Me.Read_Only_Title_Bar = "This Record is Editable"
If Me.Edit_or_Read_Only = 0 Then Me.Read_Only_Title_Bar = "This Record is Read Only"
If Me.Edit_or_Read_Only = 1 Then Me.Form.AllowEdits = True
Note - when I open up the form to add a new record it works fine
I have a form which I open in acedit mode which then based on the record and user logged in I have a Dlookup which sets the value of an unbound control. The value of this control then determines if the record is editable or not but it doesn't work as the record is still not updatable
The code below is in the form's current section
'this sets the unbound control on my form to either 1 or 0
The record is editable as the unbound control is set to 1
Me.Edit_or_Read_Only = 1
'if [Building] is not "TBA" then the record may be editable as the unbound control is set to 1 or 0 depending on record and user name
'The above element of the code works fine
If [Forms]![Work Input Form]![Building] <> "TBA" Then Me.Edit_or_Read_Only = DLookup("[Count]", "Work Input Form Edit or Read Only Q3", "")
If Me.Edit_or_Read_Only = 1 Then Me.Read_Only_Title_Bar = "This Record is Editable"
If Me.Edit_or_Read_Only = 0 Then Me.Read_Only_Title_Bar = "This Record is Read Only"
If Me.Edit_or_Read_Only = 1 Then Me.Form.AllowEdits = True
Note - when I open up the form to add a new record it works fine