K
Kenny G
Access 2003
I've got a main form "frmMain" and a "subform "sfrmFindings" on record 444
of frmMain the subform "sfrmFindings" I have 12 records on the subform for
record 444. I have a control "FindCorrCompleted," this control is a primary
control on the subform (see code below). The problem I am having is that
when I am on record 12 and click the control FindCorrCompleted this action
affects all 12 entries under 444 not just the 12th.
Would someone tell me what exactly is happening here? Thanks in advance for
your assistance.
Private Sub FindCorrCompleted_AfterUpdate()
If Me.FindCorrCompleted = True And Me.Standard <> " " Then
Me.Standard.Enabled = False
Me.NCM = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard = "" Then
Me.Standard.Enabled = True
Me.NCM = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard <> "" Then
Me.Standard.Enabled = True
Me.NCM = "N"
End If
End If
End If
If Me.FindCorrCompleted = True And Me.Standard2 <> " " Then
Me.Standard2.Enabled = False
Me.NCM2 = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard2 = "" Then
Me.Standard2.Enabled = True
Me.NCM2 = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard2 <> "" Then
Me.Standard2.Enabled = True
Me.NCM2 = "N"
End If
End If
End If
If Me.FindCorrCompleted = True And Me.Standard3 <> " " Then
Me.Standard3.Enabled = False
Me.NCM3 = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard3 = "" Then
Me.Standard3.Enabled = True
Me.NCM3 = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard3 <> "" Then
Me.Standard3.Enabled = True
Me.NCM3 = "N"
End If
End If
End If
If Me.FindCorrCompleted = True And Me.Standard4 <> " " Then
Me.Standard4.Enabled = False
Me.NCM4 = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard4 = "" Then
Me.Standard4.Enabled = True
Me.NCM4 = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard4 <> "" Then
Me.Standard4.Enabled = True
Me.NCM4 = "N"
End If
End If
End If
If Me.FindCorrCompleted = True And Me.Standard5 <> " " Then
Me.Standard5.Enabled = False
Me.NCM5 = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard5 = "" Then
Me.Standard5.Enabled = True
Me.NCM5 = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard5 <> "" Then
Me.Standard5.Enabled = True
Me.NCM5 = "N"
End If
End If
End If
End Sub
I've got a main form "frmMain" and a "subform "sfrmFindings" on record 444
of frmMain the subform "sfrmFindings" I have 12 records on the subform for
record 444. I have a control "FindCorrCompleted," this control is a primary
control on the subform (see code below). The problem I am having is that
when I am on record 12 and click the control FindCorrCompleted this action
affects all 12 entries under 444 not just the 12th.
Would someone tell me what exactly is happening here? Thanks in advance for
your assistance.
Private Sub FindCorrCompleted_AfterUpdate()
If Me.FindCorrCompleted = True And Me.Standard <> " " Then
Me.Standard.Enabled = False
Me.NCM = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard = "" Then
Me.Standard.Enabled = True
Me.NCM = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard <> "" Then
Me.Standard.Enabled = True
Me.NCM = "N"
End If
End If
End If
If Me.FindCorrCompleted = True And Me.Standard2 <> " " Then
Me.Standard2.Enabled = False
Me.NCM2 = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard2 = "" Then
Me.Standard2.Enabled = True
Me.NCM2 = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard2 <> "" Then
Me.Standard2.Enabled = True
Me.NCM2 = "N"
End If
End If
End If
If Me.FindCorrCompleted = True And Me.Standard3 <> " " Then
Me.Standard3.Enabled = False
Me.NCM3 = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard3 = "" Then
Me.Standard3.Enabled = True
Me.NCM3 = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard3 <> "" Then
Me.Standard3.Enabled = True
Me.NCM3 = "N"
End If
End If
End If
If Me.FindCorrCompleted = True And Me.Standard4 <> " " Then
Me.Standard4.Enabled = False
Me.NCM4 = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard4 = "" Then
Me.Standard4.Enabled = True
Me.NCM4 = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard4 <> "" Then
Me.Standard4.Enabled = True
Me.NCM4 = "N"
End If
End If
End If
If Me.FindCorrCompleted = True And Me.Standard5 <> " " Then
Me.Standard5.Enabled = False
Me.NCM5 = "Y"
Else
If Me.FindCorrCompleted = False And Me.Standard5 = "" Then
Me.Standard5.Enabled = True
Me.NCM5 = "N"
Else
If Me.FindCorrCompleted = False And Me.Standard5 <> "" Then
Me.Standard5.Enabled = True
Me.NCM5 = "N"
End If
End If
End If
End Sub