B
Brant Burrow
Hello!
I have a working report that I am enhancing to highlight
any changes in the data, when compared to a previously
captured "snapshot" of the data. I already have the code
in place (elsewhere in the application) to create
the "snapshot" in a separate table, and I have created a
query that combines the current data, along with
the "snapshot" data, into a single record source for the
report.
So, each resulting record from the query would contain the
following fields:
EmployeeNum
LastName
SNAP_LastName
FirstName
SNAP_FirstName
HomePhone
SNAP_HomePhone
etc.
The Detail section of the report aready contains text box
controls which are bound to the "non-SNAP" fields.
I want to use the Detail's OnFormat event to run through a
series of comparisons between the "non-SNAP" fields and
the corresponding "SNAP" fields, and wherever the pairings
are different, I will change the BackColor property of the
text box to vbYellow (otherwise, I'll set it to the
normall vbWhite).
I have already proven that the concept will work, by
placing another text box (Visible=False) on the report for
the SNAP_LastName field. But, what I'm trying to avoid,
is having to clutter up the Detail section of the report
with a whole series of duplicated non-visible text boxes,
just to be able to gain access to the data in all of
the "SNAP" fields of the record.
Is there a way to directly reference fields in the current
record, when they do not have any associated control
defined on the report? I fooled around a bit with "Me"
and "CurrentRecord" in the VBA code ... but with no luck.
I'm hoping that I just need to tweak the syntax a little
bit to have success.
Any help/ideas will be greatly appreciated.
Brant
I have a working report that I am enhancing to highlight
any changes in the data, when compared to a previously
captured "snapshot" of the data. I already have the code
in place (elsewhere in the application) to create
the "snapshot" in a separate table, and I have created a
query that combines the current data, along with
the "snapshot" data, into a single record source for the
report.
So, each resulting record from the query would contain the
following fields:
EmployeeNum
LastName
SNAP_LastName
FirstName
SNAP_FirstName
HomePhone
SNAP_HomePhone
etc.
The Detail section of the report aready contains text box
controls which are bound to the "non-SNAP" fields.
I want to use the Detail's OnFormat event to run through a
series of comparisons between the "non-SNAP" fields and
the corresponding "SNAP" fields, and wherever the pairings
are different, I will change the BackColor property of the
text box to vbYellow (otherwise, I'll set it to the
normall vbWhite).
I have already proven that the concept will work, by
placing another text box (Visible=False) on the report for
the SNAP_LastName field. But, what I'm trying to avoid,
is having to clutter up the Detail section of the report
with a whole series of duplicated non-visible text boxes,
just to be able to gain access to the data in all of
the "SNAP" fields of the record.
Is there a way to directly reference fields in the current
record, when they do not have any associated control
defined on the report? I fooled around a bit with "Me"
and "CurrentRecord" in the VBA code ... but with no luck.
I'm hoping that I just need to tweak the syntax a little
bit to have success.
Any help/ideas will be greatly appreciated.
Brant