Hi
I'm a bit of a newbie on Access. I'm using Access 2000 and am trying to disable some fields on a form based on the values selected in other fields on the same form.
I'm using the AfterUpdate function on the fields to enable / disable the fields:
-------------------
[Code=vb]Private Sub field1_AfterUpd ate()
If field1.Value = "Partial" Then
txtdoc.Enabled = False
ElseIf field1.Value = "Full" Then
txtdoc.Enabled = True
Else
txtdoc.Enabled = False
End If
End Sub
[/Code]
----------------
This works while I am in the record being updated however when I move to the previous / next record the enabled / disabled fields remain acording to the last updated one. Is there a function that I can use to check the data in the previous / next record and enable / disable fields accordingly?
Any help would be much appreciated!
I'm a bit of a newbie on Access. I'm using Access 2000 and am trying to disable some fields on a form based on the values selected in other fields on the same form.
I'm using the AfterUpdate function on the fields to enable / disable the fields:
-------------------
[Code=vb]Private Sub field1_AfterUpd ate()
If field1.Value = "Partial" Then
txtdoc.Enabled = False
ElseIf field1.Value = "Full" Then
txtdoc.Enabled = True
Else
txtdoc.Enabled = False
End If
End Sub
[/Code]
----------------
This works while I am in the record being updated however when I move to the previous / next record the enabled / disabled fields remain acording to the last updated one. Is there a function that I can use to check the data in the previous / next record and enable / disable fields accordingly?
Any help would be much appreciated!
Comment