subform not displaying

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform (sfrmPKsContainerFills) that has become a real mystery.
Here's the SQL (stripped out all unnecessary fields):

SELECT tblPKsContainerFills.txtProfileID,
tblPKsContainerFills.ContainerFillsID, tblPKsContainerFills.DeclaredWeight,
tblPKsContainerFills.DecWtUOM, [DeclaredWeight]*[gConvFactor] AS gConv
FROM tblPKsContainerFills LEFT JOIN tblUOMVolumeLiquidMass ON
tblPKsContainerFills.DecWtUOM = tblUOMVolumeLiquidMass.txtUOMVolumeLiquid;

The main form is bug-free and there's only one record in
tblPKsContainerFills. Everything works fine until I add
tblUOMVolumeLiquidMass to the SQL above. When this is added the subform
doesn't display until I navigate the main form to the record that relates to
the one in tblPKsContainerFills.

Does anyone see what I'm doing wrong? Your help is greatly appreciated.
Thanks!
 
JohnLute said:
I have a subform (sfrmPKsContainerFills) that has become a real mystery.
Here's the SQL (stripped out all unnecessary fields):

SELECT tblPKsContainerFills.txtProfileID,
tblPKsContainerFills.ContainerFillsID, tblPKsContainerFills.DeclaredWeight,
tblPKsContainerFills.DecWtUOM, [DeclaredWeight]*[gConvFactor] AS gConv
FROM tblPKsContainerFills LEFT JOIN tblUOMVolumeLiquidMass ON
tblPKsContainerFills.DecWtUOM = tblUOMVolumeLiquidMass.txtUOMVolumeLiquid;

The main form is bug-free and there's only one record in
tblPKsContainerFills. Everything works fine until I add
tblUOMVolumeLiquidMass to the SQL above. When this is added the subform
doesn't display until I navigate the main form to the record that relates to
the one in tblPKsContainerFills.

Does anyone see what I'm doing wrong?

Is that SQL the record source of the main form or the
subform?

What is the record source for the other form?

Either way, I don't understand why it is joining two tables.
Normally each form would be bound to data from a single
table and the subform control's Link Master/Child Fields
properties are used to synchronize the records.

A likely reason that the subform does not appear is because
it has no data to display AND you have set its
AllowAdditions property to No so it can't display a new
record.
 
Hi, Marshall. Thanks for the response.
--
www.Marzetti.com


Marshall Barton said:
Is that SQL the record source of the main form or the
subform?
Subform.

What is the record source for the other form?

SELECT tblProfiles.*, tblProfiles.Type
FROM tblProfiles
WHERE (((tblProfiles.Type)="BTGL" Or (tblProfiles.Type)="BTPL" Or
(tblProfiles.Type)="CP" Or (tblProfiles.Type)="DR" Or (tblProfiles.Type)="IM"
Or (tblProfiles.Type)="PL" Or (tblProfiles.Type)="PP" Or
(tblProfiles.Type)="TD" Or (tblProfiles.Type)="TH"));
Either way, I don't understand why it is joining two tables.
Normally each form would be bound to data from a single
table and the subform control's Link Master/Child Fields
properties are used to synchronize the records.

I'm trying to put a calculated field into the subform therefore I've made
that particular join to do a lookup. Maybe I'm going about that all wrong?
A likely reason that the subform does not appear is because
it has no data to display AND you have set its
AllowAdditions property to No so it can't display a new
record.

The AllowAdditions property is Yes so I'm pretty sure your first observation
is correct.
 
JohnLute said:
SELECT tblProfiles.*, tblProfiles.Type
FROM tblProfiles
WHERE (((tblProfiles.Type)="BTGL" Or (tblProfiles.Type)="BTPL" Or
(tblProfiles.Type)="CP" Or (tblProfiles.Type)="DR" Or (tblProfiles.Type)="IM"
Or (tblProfiles.Type)="PL" Or (tblProfiles.Type)="PP" Or
(tblProfiles.Type)="TD" Or (tblProfiles.Type)="TH"));


I'm trying to put a calculated field into the subform therefore I've made
that particular join to do a lookup. Maybe I'm going about that all wrong?


The AllowAdditions property is Yes so I'm pretty sure your first observation
is correct.


A couple of other things to check:

Make sure the subform's record source query is updatable and
that it returns the desired dataset.

Double check that the Link Master/Child properties are set
correctly.
 
Back
Top