I have a report that I am designing. Now, the table that the data comes from, has an field called ATTRIBUTE. This field is populated with an R to indicate when a page break should occur. I then have this block of code to condition the page break:
Expand|Select|Wrap|Line Numbers
- Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
- Me![CondPgBreak].Visible = False
- If Me![ATTRIBUTE] = "R" Then
- Me![CondPgBreak].Visible = True
- End If
- End Sub
Now, due to design issues, I have had to add a new field called PAGEFLAG, and now my R references for the page breaks occur in that field. I have updated the query that the report pulls from to add this new field. When I run the query everything is fine. However when I try running the report with the code changed to reflect the new field to use, :
Expand|Select|Wrap|Line Numbers
- Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
- Me![CondPgBreak].Visible = False
- If Me![PAGEFLAG] = "R" Then
- Me![CondPgBreak].Visible = True
- End If
- End Sub
Exact error is: Graphics.mdb can't find the field 'PAGEFLAG' referred to in your expression. Runtime error 2465
I am confused... Please help me