J
Jonny Lumberton
Got me stumped...
i have built a main form named "frmMain" with combo boxes to select values
to filter a relationship of paired tables in a subform1 and subform2.
there are pairs of two tables that are linked as a one-to-many relationships
for each year. ActivityMaster2005 links to ActivityDetail2005,
ActivityMaster2006 links to ActivityDetail2006, etc. Each set of tables are
identical in structure including the parent and child fields for linking.
So I created a subform for the ActivityDetailyyyy and placed this onto a
subform for ActivityMasteryyyy -- both set to display as a datsheet view.
These subforms were placed onto a master form named frmMain.
the user enters the year on the frmMain along with filter criteria captured
in combo boxes. Then the user clicks a filter button I added to the frmMain.
the filter button onclick function is invoked where I build the Select query
and then insert the created sql string into the recordsource property for the
ActivityMaster subform.
This appears to work fine -- for the display of the master data. But when I
click the (+) on the record to open the ActivityDetail -- all I get is blanks
in the data fields.
I can manually enter the query for recordsource into the subform propoerty
sheet from form design view for the ActivityMasteryyyy form and the table
name for the ActivityDetail into the property sheets of the ActivtySheetyyyy
subform -- and this works -- just cannot reference and set the correct fields
from VBA function for the subdatasheet for ActivityDetailyyyy.
Now I want to set the name of the table for the ActivityDetail subform that
matches the table for the ActivityMaster form query -- have tried a number of
ways to set the table but just do not have enough knowledge of the syntax or
method to save the name.
any help.
Johnny Lumberton
i have built a main form named "frmMain" with combo boxes to select values
to filter a relationship of paired tables in a subform1 and subform2.
there are pairs of two tables that are linked as a one-to-many relationships
for each year. ActivityMaster2005 links to ActivityDetail2005,
ActivityMaster2006 links to ActivityDetail2006, etc. Each set of tables are
identical in structure including the parent and child fields for linking.
So I created a subform for the ActivityDetailyyyy and placed this onto a
subform for ActivityMasteryyyy -- both set to display as a datsheet view.
These subforms were placed onto a master form named frmMain.
the user enters the year on the frmMain along with filter criteria captured
in combo boxes. Then the user clicks a filter button I added to the frmMain.
the filter button onclick function is invoked where I build the Select query
and then insert the created sql string into the recordsource property for the
ActivityMaster subform.
This appears to work fine -- for the display of the master data. But when I
click the (+) on the record to open the ActivityDetail -- all I get is blanks
in the data fields.
I can manually enter the query for recordsource into the subform propoerty
sheet from form design view for the ActivityMasteryyyy form and the table
name for the ActivityDetail into the property sheets of the ActivtySheetyyyy
subform -- and this works -- just cannot reference and set the correct fields
from VBA function for the subdatasheet for ActivityDetailyyyy.
Now I want to set the name of the table for the ActivityDetail subform that
matches the table for the ActivityMaster form query -- have tried a number of
ways to set the table but just do not have enough knowledge of the syntax or
method to save the name.
any help.
Johnny Lumberton