Hello,
I have an access database which the following code works fine.
If ([Package] = 1 And [Structure] = 9) Then
[New Con].Visible = True
[Structure construction type].Visible = True
[Existing Deck].Visible = True
[Existing Support].Visible = True
'Me![Repair Type] = 76
'Me![Measure Dimension] = DLookup("[Measure Dimension]", "[Repair Type]", "[Repair Type] = 76")
End If
However, when I add
Me![Repair Type] = 76
Me![Measure Dimension] = DLookup("[Measure Dimension]", "[Repair Type]", "[Repair Type] = 76")
I get the following error
Run-time error '2115' - The macro or function set to the BeforeUpdate or Validation Rule property is preventing Access saving the data in the field.
There is no validation rule and the code runs with no problem in other parts of my code?
Can anyone help?
Thanks,
osx
I have an access database which the following code works fine.
If ([Package] = 1 And [Structure] = 9) Then
[New Con].Visible = True
[Structure construction type].Visible = True
[Existing Deck].Visible = True
[Existing Support].Visible = True
'Me![Repair Type] = 76
'Me![Measure Dimension] = DLookup("[Measure Dimension]", "[Repair Type]", "[Repair Type] = 76")
End If
However, when I add
Me![Repair Type] = 76
Me![Measure Dimension] = DLookup("[Measure Dimension]", "[Repair Type]", "[Repair Type] = 76")
I get the following error
Run-time error '2115' - The macro or function set to the BeforeUpdate or Validation Rule property is preventing Access saving the data in the field.
There is no validation rule and the code runs with no problem in other parts of my code?
Can anyone help?
Thanks,
osx