Accessible92866
Registered User.
- Local time
- Yesterday, 21:23
- Joined
- Nov 4, 2008
- Messages
- 11
Hello all,
I have a report in Access 2007 that generates a sign-in sheet for monthly club meetings. Normally, the cost per meeting is $25 for members and $30 for non-members. However, this month is a special dinner meeting and the cost is ten dollars higher--$35 for members and $40 for non-members. This is the only thing that changes on the report.
I have two labels, one with each set of prices, stacked on top of each other. What I want to happen is that if the meeting date is 4/15/09, the regular price label should be invisible and the special price label should be visible. If I change the visibility manually, everything is fine, but I created an event procedure in the OnFormat property of the page header to make this happen, but it doesn't work. The regular label always displays, like it's not performing the If test.
Here's the code:
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
If Me.MeetingDate = #4/15/2009# Then
Me.PriceLabel_Regular.Visible = False
Me.PriceLabel_Special.Visible = True
Else
Me.PriceLabel_Regular.Visible = True
End If
End Sub
Can anyone see what I'm doing wrong? (I'm pretty new at VB, so I'm still finding my way around in all this...)
Thanks for any help you can offer,
Accessible in California
I have a report in Access 2007 that generates a sign-in sheet for monthly club meetings. Normally, the cost per meeting is $25 for members and $30 for non-members. However, this month is a special dinner meeting and the cost is ten dollars higher--$35 for members and $40 for non-members. This is the only thing that changes on the report.
I have two labels, one with each set of prices, stacked on top of each other. What I want to happen is that if the meeting date is 4/15/09, the regular price label should be invisible and the special price label should be visible. If I change the visibility manually, everything is fine, but I created an event procedure in the OnFormat property of the page header to make this happen, but it doesn't work. The regular label always displays, like it's not performing the If test.
Here's the code:
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
If Me.MeetingDate = #4/15/2009# Then
Me.PriceLabel_Regular.Visible = False
Me.PriceLabel_Special.Visible = True
Else
Me.PriceLabel_Regular.Visible = True
End If
End Sub
Can anyone see what I'm doing wrong? (I'm pretty new at VB, so I'm still finding my way around in all this...)
Thanks for any help you can offer,
Accessible in California