Yes, What is tblPhysicianProfileReportData.EncounterType ?
If you are trying to reference a field in a table here, that is not correct.
You need to be looking at a control on your report. The only way your code
would be correct is if you had a recordset open and you had
tblPhysicianProfileReportData identified as the recordset name. Even then,
it would see .EncounterType as a property, not as a field. If it were a
field it should be referenced as !EncounterType.
One other thing, Use Cancel = True rather than Cancel = 1. That is not
causing the error, but it is better coding practice. The above reference to
tblPhysicianProfileReportData.EncounterType is the problem.
"robertfuschetto via AccessMonster.com" wrote:
> The following code yeilds a Run Time 424 - Object Required Error. I assure
> you the table and field name are correct.
>
>
> Private Sub GroupFooter5_Format(Cancel As Integer, FormatCount As Integer)
> If tblPhysicianProfileReportData.EncounterType = "none" Then
> Cancel = 1
> End If
> End Sub
>
> Ideas?
>
> Klatuu wrote:
> >I am talking about the Report Footer Format event. Notice its definition:
> >Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
> > ^^^^
> >It is the Cancel argument you need to use here.
> >
> >If table.item = "suppress" Then
> > Cancel = True
> >End
> >
> >Setting Cancel to True causes the report to ingore formatting for the
> >current record.
> >
> >> Notice in the Function definition, there is a Cancel argument. All you have
> >> to do is:
> >[quoted text clipped - 7 lines]
> >> > CancelEvent but I am unsure how to procede. I assume I use the code builder
> >> > to build the event but I am not sure how to code up my If condition.
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/200603/1
>