report/vba problem

  • Thread starter tope12 via AccessMonster.com
  • Start date
T

tope12 via AccessMonster.com

Im trying to write some code into the header part of a report on the format
event. I keep getting an error message that says that it cant find the field
"NBA". I even specified the table it was in (budget.nba.value) and it still
gives me the same error.
Does anyone know what i did wrong?


Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)

If employee_department = "NBA" Then
Text67 = NBA
End If

End Sub
 
M

Marshall Barton

tope12 said:
Im trying to write some code into the header part of a report on the format
event. I keep getting an error message that says that it cant find the field
"NBA". I even specified the table it was in (budget.nba.value) and it still
gives me the same error.
Does anyone know what i did wrong?


Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)

If employee_department = "NBA" Then
Text67 = NBA
End If

End Sub


If NBA is a field in the report's record source table/query,
you can do that, but you need to bind the NBA field to a
(invisible?) text box on the report.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top