S
SandyR
I have a report that is printed from a form. The record source for the
report is a query that includes all the fields needed for the report. I have
a text box that needs to be filled in based on the value of a field called
STATUS. I have code in the detail_print event to set this value. When I run
the report it gives me error 2465 and tells me that it can't find the field
STATUS. When I run the query by itself, the field is clearly there in the
result.
Originally I had this field in the Pageheader_print event. I thought the
problem might be one of timing, so I moved it to the detail event, but I
still get the error.
I don't think that the code is the problem, but here it is:
Select Case Me.status
Case "W"
txtstatus = "Waiting for Supervisor Approval"
Case "S"
txtstatus = "waiting for Purchasing Approval"
Case "P"
txtstatus = "waiting for Finance Director Approval"
Case "A"
txtstatus = "Approved"
Case Else
txtstatus = "not submitted"
End Select
report is a query that includes all the fields needed for the report. I have
a text box that needs to be filled in based on the value of a field called
STATUS. I have code in the detail_print event to set this value. When I run
the report it gives me error 2465 and tells me that it can't find the field
STATUS. When I run the query by itself, the field is clearly there in the
result.
Originally I had this field in the Pageheader_print event. I thought the
problem might be one of timing, so I moved it to the detail event, but I
still get the error.
I don't think that the code is the problem, but here it is:
Select Case Me.status
Case "W"
txtstatus = "Waiting for Supervisor Approval"
Case "S"
txtstatus = "waiting for Purchasing Approval"
Case "P"
txtstatus = "waiting for Finance Director Approval"
Case "A"
txtstatus = "Approved"
Case Else
txtstatus = "not submitted"
End Select