473,386 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Subform shows no records when Main form is filtered

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
2 4765
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Charlene | last post by:
I have an Invoice/Invoice Details form/subform. In the page footer of the Invoice Details subform I have a textbox with the control source set to =Sum(). I then pull this value into the main form...
0
by: Carl | last post by:
I have a main form with navigation buttons on it and a label showing for example Record 1 of 15 using recordsetclone on it and eveything works fine. When I move through the records the record...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
5
by: tdmailbox | last post by:
I have a form with a child form. In the child form there is a list of names that can grow quite large. On the parent form I want to display the first name from the child form. I set up a test...
5
by: Susan Bricker | last post by:
Hi. I have a Main form with a subform that has a subform. I have an 'Add Event' button on the Main Form that issues the following instruction: DoCmd.GoToRecord , , acNewRec If the record...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
0
by: diogenes | last post by:
"Rick Brandt" <rickbrandt2@hotmail.comwrote in news:bPnKj.456$%41.325 @nlpi064.nbdc.sbc.com: I used this approach, and it works a treat! ID In(SELECT Order_ID FROM orderitems WHERE NAME =...
2
by: Dave | last post by:
Access 2003 I have an unbound search form, which shows filtered search records in it’s sub-form. On the unbound search form I wish to place a button, which will close off the search form, and...
1
by: woodey2002 | last post by:
Hi Everyone and many thanks for your time.. I am trying to begin access and a bit of VBA i am enjoying it but I have a annoying problem I just can’t get any where on. My databse mostly includes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.