PNGBill
07-27-2010, 12:23 AM
Hi Forum,
I have an unbound text box control in a Report Group Header and want related data to populate same.
In the Report [ADPK] exits as bound control. (A field in table TBLACCDET)
I want to populate an unbound control with the Employer Name String which is [EDName] from TBLEMDET table.
The link to EDName is via EDPK which is the primary key for TBLEMDET and also a field in TBLACCDET.
DLookup would work as =DLookup("[EDName]","TBLEMDET", "How to join ADPK on the report with ADPK in TBLACCDET to find EDPK?")
This sql lists EDName for ADPK
SELECT TBLACCDET.ADPK, TBLEMPDET.EDName
FROM TBLEMPDET INNER JOIN TBLACCDET ON TBLEMPDET.EDPK = TBLACCDET.EDPK;
I am thinking of creating a Function that will return the string EDName when used as the record source of the report control but unsure exactly how.
Attempt so far just shows the Name for the first record of TBLACCDET where as I would want to filter the data by way of the control [ADPK] on the report.:confused:
If someone could point me the right direction it would be much appreciated.
I have an unbound text box control in a Report Group Header and want related data to populate same.
In the Report [ADPK] exits as bound control. (A field in table TBLACCDET)
I want to populate an unbound control with the Employer Name String which is [EDName] from TBLEMDET table.
The link to EDName is via EDPK which is the primary key for TBLEMDET and also a field in TBLACCDET.
DLookup would work as =DLookup("[EDName]","TBLEMDET", "How to join ADPK on the report with ADPK in TBLACCDET to find EDPK?")
This sql lists EDName for ADPK
SELECT TBLACCDET.ADPK, TBLEMPDET.EDName
FROM TBLEMPDET INNER JOIN TBLACCDET ON TBLEMPDET.EDPK = TBLACCDET.EDPK;
I am thinking of creating a Function that will return the string EDName when used as the record source of the report control but unsure exactly how.
Attempt so far just shows the Name for the first record of TBLACCDET where as I would want to filter the data by way of the control [ADPK] on the report.:confused:
If someone could point me the right direction it would be much appreciated.