Help with Run-time error 2465

CrashCoordinator

New member
Local time
Today, 07:48
Joined
Apr 4, 2012
Messages
2
In developing an entry form, I am trying to specify the next question based on the results of the previous entry. For instance, only when a tick box is positive should the conditional question show up. For this I've made invisible the next question and drafted code so that it only shows up when ticked for yes. However, I am getting an error when I try to include more than one statement in the If - Else loop. I'd be grateful for assistance in fixing this problem. The error is 2465 with the following statement: Microsoft cannot find the field '1' referred to in your expression.

The code is here:
Private Sub Ctl7a_Type_of_sample_Other_AfterUpdate()
If [Ctl7a_Type_of_sample_Other] = -1 Then
[Ctl7b_Type_of_sample_other_specify].Visible = True
[Ctl7c_Number_of_samples_Other].Visible = True
Else
[Ctl7b_Type_of_sample_other_specify].Visible = False
[Ctl7c_Number_of_samples_Other].Visible = False
End If
End Sub

What have I done wrong? Thanks in advance, CC.
 

Users who are viewing this thread

Back
Top Bottom