Trouble with subform linker

T

tkosel

I have an Access 2003 front end application that is linked to a SQL 2000
backend. (ODBC) I have two related tables (Parent-Child, one to many
relationship.) primary key in parent named ID which is an Identity type field
in SQL and a related field named ID in the child.

If I create a new form-subform combination in the Access front end the
subform linker wizard builds me a correct SQL Statement such as "Show CHILD
TABLE for each record in PARENT TABLE using ID"

However, one of my existing forms has an incorrect SQL statement like this:
"Show CHILD TABLE for each record in <SQL Statement> using ID".

I cannot get it to create the right SQL Statement. Any help out there? Is
there a way to manaully edit this property? I cannot seem to find one.
 
S

SusanV

Hi tkosel,

The ,SQL statement> part is the datasource for the main form - if you have a
table as the datasource you would see the table name there instead. If this
SQL is incorrect, fix it in the datasource property of the form.

If you have the SQL correct but the forms aren't linking correctly, instead
of fighting the wizard, you can look at the properties of the subform
control while in design mode of the main form (the title of the properties
window will be Subform / Subreport: Name of subformcontrol).

On the Data tab, click on the ... next to Link Child Fields to set the
correct lining between the fields. If your relationships are set right
between the 2 data sources, this should set you to rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top