Kamis, 27 Oktober 2011

[MS_AccessPros] Why does Access not recognize subreport with the "rpt" prefix

 

When I open a report, there is a routine that checks for a certain condition. If the condition is met, then the Visible Property of one of two of my subreports will be set to "True;" however, if the condition is not met, the Visible Property will be set to "False." I kept getting an error that Access could not find the field name "[a straight vertical line]". It was a straight verticle line in the error message between two quotes. Here is the code:

If Me.OpenArgs = "RepairOrder" Then
[rptParts-RepairOrder subreport].Visible = True
Else
[rptParts-RepairOrder subreport].Visible = False
End If

The field name is spelled correctly, but when I went to the expression builder to see if the form was there, and discovered it was spelled with the "frm" prefix. Notwithstanding that the report has an "rpt" prefix, I changed the code (above) to the "frm" prefix and the code works. I do not want to have any false sense of security here, so I'd like to know if anyone can explain this to me.

Thanks in advance.

r/David

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar