Hello,
I am modifying an excising database for a acquaintance. now I have the following problem:
The database consists of two tables (TblA and TblB) and two forms (FrmA and FrmB). One of the two forms has a subform (SubA).
Form A is used to populate data from table A using listbox and a textbox. The user can double click a row, then form B is opened and the data in table A is showed in a better way (using bound textboxes that show data from table A).
This code is placed in the form record source of from B to pull the data out of table A.
Using the recordnumber from table A additional data is pulled out of table B and showed in subform A.
but the subform does not load any data but gives a inputbox "parameter value". When I enter the recordnumber from table A it works. I have tried different things to fix this but without any good results. The subform settings:
The subform.sourceobject is set to is Table B
subform.linkmasterfields is set to:
SELECT TblA.*, TblA.ID FROM TblA WHERE (((TblA.ID)=forms!FrmA!ListA));
subform.linkchieldfields is set to:
SELECT TblA.*, TblA.ID FROM TblA WHERE (((TblA.ID)=forms!FrmA!ListA));
I've also tried:
SELECT TblB.*, TblB.ID FROM TblB WHERE (((TblB.ID)=forms!FrmA!ListA)); for the linkmasterfields and the linkchildfields, but this also does not work.
What is the problem
(I know....... I am a Noob
)
Best regards.
I am modifying an excising database for a acquaintance. now I have the following problem:
The database consists of two tables (TblA and TblB) and two forms (FrmA and FrmB). One of the two forms has a subform (SubA).
Form A is used to populate data from table A using listbox and a textbox. The user can double click a row, then form B is opened and the data in table A is showed in a better way (using bound textboxes that show data from table A).
This code is placed in the form record source of from B to pull the data out of table A.
Code:
SELECT TblA.*, TblA.ID FROM TblA WHERE (((TblA.ID)=forms!FrmA!ListA));
Using the recordnumber from table A additional data is pulled out of table B and showed in subform A.
but the subform does not load any data but gives a inputbox "parameter value". When I enter the recordnumber from table A it works. I have tried different things to fix this but without any good results. The subform settings:
The subform.sourceobject is set to is Table B
subform.linkmasterfields is set to:
SELECT TblA.*, TblA.ID FROM TblA WHERE (((TblA.ID)=forms!FrmA!ListA));
subform.linkchieldfields is set to:
SELECT TblA.*, TblA.ID FROM TblA WHERE (((TblA.ID)=forms!FrmA!ListA));
I've also tried:
SELECT TblB.*, TblB.ID FROM TblB WHERE (((TblB.ID)=forms!FrmA!ListA)); for the linkmasterfields and the linkchildfields, but this also does not work.
What is the problem
Best regards.