If No Records in Subform, Parent Form Record doesn't display

If No Records in Subform, Parent Form Record doesn't display

Post by TWVsaXNzY » Fri, 26 Feb 2010 03:12:01


If I don't have any records in a subform, the record in the parent form
doesn't display on my main form. The record is in the underlying table for
the parent form, so I don't understand what the problem is. I'm sure the
solution is simple and I'll kick myself later.

Thanks for the help!
--
Thanks.
 
 
 

If No Records in Subform, Parent Form Record doesn't display

Post by Dirk Goldg » Fri, 26 Feb 2010 03:35:58


My guess is that the main form is based on a query that inner-joins the
"parent" table to the table on which the subform is based. In a
main-form/subform arrangement, this is neither necessary nor desirable,
since it excludes any parent record that doesn't have a match. Remove the
child table from the main form's recordsource query.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

 
 
 

If No Records in Subform, Parent Form Record doesn't display

Post by TWVsaXNzY » Fri, 26 Feb 2010 03:52:01

The underlying query (record source) for the form does not include the child
table in it. Additionally, the record in question shows up in the underlying
query (record source). So this that isn't the problem. Is there somewhere
to establish the relationship between the parent and child? I want to show
all records from the underlying query (record source). Help!
--
Thanks
 
 
 

If No Records in Subform, Parent Form Record doesn't display

Post by Dirk Goldg » Fri, 26 Feb 2010 04:10:02


What is the recordsource of the main form? If it's a query (stored or
in-line SQL), what is the SQL of the query? Are you saying that if you open
that query as a datasheet, you can see the record in question, but it
doesn't appear on the form? Maybe the form has a Filter property that would
exclude the record, and Filter On Load is set to yes.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
 
 

If No Records in Subform, Parent Form Record doesn't display

Post by TWVsaXNzY » Fri, 26 Feb 2010 04:29:01

Bingo! There is a filter on it that I'll need to fix. The filter looks at
the PK in an SQL statement that includes the child table. Thanks for you
help!!
--
Thanks.