0
votes

Good afternoon,

I've got a continuous form that displays records for any number of selected employees. I'd like for only that employee's row (or more specifically a particular text box in their row) be editable and no others.

I thought about doing something like this.

Private Sub Form_Load()
If Me.txtResponse <> [Forms]![Home].txtEmployeeName Then
 Me.txtResponse.Locked = True
End If
End Sub

and I get an error that I entered an expression that has no value - and it highlights the me.txtResponse.

I don't know if i'm barking up the wrong tree or if this is even possible in a continuous bound form. Any ideas?

1

1 Answers

0
votes

Form_Load is too early for that code. Move it to the Form_Current event and it will run when first opened and again with each record navigation. You'll want to add

Else
    Me.txtResponse.Locked = False

in their to allow changes when a match is made.