Folks,
I am using MSOffice 2010 (and I tried on MSAccess 2007 as well) and I have a really simple task on a report. Based on a field value, I changed the text on a couple of captions.
Now, if I remove the field condition, the report gets printed, if I include it, the report seems to go to a black hole.
Here is the code on the OnFormat event:
If (Me.Verified) Then
Me.lblEmailOpt.Caption = "Yes, it is verified"
End If
If (Me.Audited) Then
Me.lblIdOpt.Caption = "Yes, is audited with expiration date " & Me.ExpirationDate
End If
I call the report from the form using the code below:
Dim reportName As String
Dim reportCondition As String
reportName = "rptMembershipForm1A"
reportCondition = "[MemberNumber] = " & [MemberNumber]
DoCmd.OpenReport reportName, acNormal, , reportCondition
What am I doing wrong??
...Alex
I am using MSOffice 2010 (and I tried on MSAccess 2007 as well) and I have a really simple task on a report. Based on a field value, I changed the text on a couple of captions.
Now, if I remove the field condition, the report gets printed, if I include it, the report seems to go to a black hole.
Here is the code on the OnFormat event:
If (Me.Verified) Then
Me.lblEmailOpt.Caption = "Yes, it is verified"
End If
If (Me.Audited) Then
Me.lblIdOpt.Caption = "Yes, is audited with expiration date " & Me.ExpirationDate
End If
I call the report from the form using the code below:
Dim reportName As String
Dim reportCondition As String
reportName = "rptMembershipForm1A"
reportCondition = "[MemberNumber] = " & [MemberNumber]
DoCmd.OpenReport reportName, acNormal, , reportCondition
What am I doing wrong??
...Alex