Good Day All,
I have a report that is based on a form. THe form has a series of checkboxes for describing the type of warranty problem. On the report i have some if statements that check to see if the checkbox is checked then changes to text. But now the manager wants to be able to have two or more checkboxes checked and i cannot get any of the code to work. Any ideas are most welcome.
Here is the current code:
<code>
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If warchkbx.Value = True Then
Me!warrantyreq.Value = "WARRANTY WAS REQUESTED BY CUSTOMER"
End If
If noprob.Value = True Then
Me!warreason.Value = "NO PROBLEM FOUND"
End If
If probnotdue.Value = True Then
Me!warreason.Value = "PROBLEM NOT DUE TO MANUFACTURING DEFECT"
End If
If priorrepair.Value = True Then
Me!warreason.Value = "PROBLEM NOT ASSOCIATED WITH PRIOR REPAIR"
End If
If expiredwar.Value = True Then
Me!warreason.Value = "WARRANTY PERIOD HAS EXPIRED"
End If
If otherwar.Value = True Then
Me!warreason.Value = "OTHER"
End If
End Sub
</code>
I have replaced the if statement with this code, it did not work:
<code>
If expiredwar.Value = True Then
Me!warreason.Value = me!warreason + " WARRANTY PERIOD HAS EXPIRED"
End If
</code>
Any thoughts?
Raven
I have a report that is based on a form. THe form has a series of checkboxes for describing the type of warranty problem. On the report i have some if statements that check to see if the checkbox is checked then changes to text. But now the manager wants to be able to have two or more checkboxes checked and i cannot get any of the code to work. Any ideas are most welcome.
Here is the current code:
<code>
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If warchkbx.Value = True Then
Me!warrantyreq.Value = "WARRANTY WAS REQUESTED BY CUSTOMER"
End If
If noprob.Value = True Then
Me!warreason.Value = "NO PROBLEM FOUND"
End If
If probnotdue.Value = True Then
Me!warreason.Value = "PROBLEM NOT DUE TO MANUFACTURING DEFECT"
End If
If priorrepair.Value = True Then
Me!warreason.Value = "PROBLEM NOT ASSOCIATED WITH PRIOR REPAIR"
End If
If expiredwar.Value = True Then
Me!warreason.Value = "WARRANTY PERIOD HAS EXPIRED"
End If
If otherwar.Value = True Then
Me!warreason.Value = "OTHER"
End If
End Sub
</code>
I have replaced the if statement with this code, it did not work:
<code>
If expiredwar.Value = True Then
Me!warreason.Value = me!warreason + " WARRANTY PERIOD HAS EXPIRED"
End If
</code>
Any thoughts?
Raven