I have fields that are set to be visible or not visible based on the value of another field. These results are displayed in a continuous subform. It works fine except that it only displays the visibility results for the first entry in the sbuform! If the field is set to Yes, all results display for yes, but will change to No when I click on that record (and changes all records to reflect "No". How can I make the records reflect the correct visible fields when it loads per record. Here is the code I am using...
In the On Current event for the subform I have this...
Private Sub Form_Current()
If Me!Algorithm = -1 Then
Me![Reqt AYES].Visible = True
Me![Units AYES].Visible = True
Me![Driver].Visible = True
Else
Me![Reqt AYES].Visible = False
Me![Units AYES].Visible = False
Me![Driver].Visible = False
End If
If Me!Algorithm = 0 Then
Me![Reqt ANO].Visible = True
Me![Units ANO].Visible = True
Else
Me![Reqt ANO].Visible = False
Me![Units ANO].Visible = False
End If
End Sub
Please help! I am not very experienced with codes so maybe I am just missing something?
In the On Current event for the subform I have this...
Private Sub Form_Current()
If Me!Algorithm = -1 Then
Me![Reqt AYES].Visible = True
Me![Units AYES].Visible = True
Me![Driver].Visible = True
Else
Me![Reqt AYES].Visible = False
Me![Units AYES].Visible = False
Me![Driver].Visible = False
End If
If Me!Algorithm = 0 Then
Me![Reqt ANO].Visible = True
Me![Units ANO].Visible = True
Else
Me![Reqt ANO].Visible = False
Me![Units ANO].Visible = False
End If
End Sub
Please help! I am not very experienced with codes so maybe I am just missing something?
Comment