Enable or Disable Fileds after update

DavidAC

Board Regular
Joined
Feb 10, 2003
Messages
134
Office Version
  1. 365
Hi, i am trying to update a field to be enable if a certain condition is met in another field. However i keep getting syntax errors any help would be appreciated. the field that contains the condition is a yes/no field and here is the code i am using.
If Me!Is will update = '-1' Then
Me!previous_document_id.Enabled = True
Me!Date_previous_destroyed.Enabled = True

Else
Me!previous_document_id.Enabled = False
Me!Date_previous_destroyed.Enabled = False

End If

Regards

David :p
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
If "Is will update" is the name of your Yes/No field then you need to enclose it in Square Brackets.
If Me![Is will update] = True Then
Access does not like spaces in names in code.

HTH

Peter
 
Upvote 0

Forum statistics

Threads
1,221,557
Messages
6,160,477
Members
451,650
Latest member
kibria

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top