By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Subform shows no records when Main form is filtered

P: n/a
Hello all...

I'm having an issue with MSAccess 2000. I have a Form that holds
records of my cartridge loads for a rifle and a subform that lists all
groups that have been fired with that load. They are linked by the
load_id field and when I just browse through the loads everything shows
up correctly. Each recorded group is displayed on a line of the
datasheet subform. However, when I filter the form for say my
"Selected" flag meaning that load was chosen as one I'd like to repeat
and apply the filter my main form shows the load records I expect. The
subform however shows no records. I have checked it several times and
it is linked to the correct fields but once the main form is filtered
nothing shows up in the subform until the filter is removed.

Anyone have any directions for me to look here? Thanks in advance.

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Suggestions:

1. Open the main form in design view.
Right-click the subform control, and choose Properties.
How many fields are involved in the LinkMasterFields and LinkChildFields?
Is it possible that Access is using more than the one field you expect, and
that the 2nd field does not match when the main form is filtered?

2. If you programmatically reassign the RecordSource of the form in the
subform or reassign the SourceObject of the subform control, Access is
likely to reset the LinkMasterFields/LinkChildFields to whatever it thinks
you want, so at runtime the values end up being different from what you see
at design time.

3. If any of the fields in the LinkMasterFields and LinkChildFields are
actually calculated query fields, it is possible that Access is not matching
the data types correctly.

4. If none of those ideas solve the problem, there are bugs associated with
a Filter in the main form if you also set the Filter or OrderBy properties
of the subform. Details in this article:
Incorrect filtering of forms and reports
at:
http://allenbrowne.com/bug-02.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<or**********@yahoo.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hello all...

I'm having an issue with MSAccess 2000. I have a Form that holds
records of my cartridge loads for a rifle and a subform that lists all
groups that have been fired with that load. They are linked by the
load_id field and when I just browse through the loads everything shows
up correctly. Each recorded group is displayed on a line of the
datasheet subform. However, when I filter the form for say my
"Selected" flag meaning that load was chosen as one I'd like to repeat
and apply the filter my main form shows the load records I expect. The
subform however shows no records. I have checked it several times and
it is linked to the correct fields but once the main form is filtered
nothing shows up in the subform until the filter is removed.

Anyone have any directions for me to look here? Thanks in advance.

Nov 13 '05 #2

P: n/a
It turns out the problem was that I was using a pre-built form as the
source of the sub-form. It worked great as long as no filter was
applied but failed for reasons I can't see with a filter. I changed to
a query I built as the source for the subform and then filtering worked
as expected.

Kinda scratching my head as to why really... the correct filter was
being applied to the pre-built form but it just would not display the
data.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.