Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 11th, 2009, 06:49 PM
Authorized User
 
Join Date: May 2009
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with records in a Linked subform

I am trying to link a subform and see all of the records. I am doing something wrong and cannot figure out what it is. Can you think of anything I am missing in the below?
  1. The main for and subform are based on tables. (I do not want to use queries because I want to be able to do data entry in the subform).
  2. They are related by a customerID field showing all records in the subform's table that have a valid customerID in the main forms table.
  3. I ran a query that shows all fields in the subform's table where there is an existing customerID in the main form's table. That is, I am trying to see what I find in the "sub table" if I run a query with the same match as I use on the form level to link the two forms.
  4. This query shows me all records in the subform (24 of them in the test stage).
  5. When I run the subform, I of course see all 24 records.
  6. When I put the subform into the main form, with the link of the same two tables using the customerID field, I only see 6 of the records.
Getting desperate, I then copied record 1 that was showing up everywhere, from the top line of the base table for the subform and pasted it at the bottom of the table. And then deleted its original from the top line of the table. Surely it would still show up because the copied records is identical to the one I deleted? NO! The copy does not show up.

So it would seem it cannot have anything to do with the link or the base records. What would cause some records to show up and not others?
 
Old May 13th, 2009, 09:57 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Hmmm... I don't see the need for the query relating the two tables to put on your subform. Just set the record sources of each form to their respective tables. When you place the subform into the main form, Access will ask you to set the Parent / Child property of the subform. It is there you link the customer ID from the main form (parent) to the subform (child). When you scroll through the main form, the subform's records will then automatically filter. There is no need for a separate query.
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Autopopulate Subform with New Records Odeh Naber Access 0 August 2nd, 2007 04:29 AM
deleting records in linked tables tico31pl Access 4 May 18th, 2006 04:10 PM
Linked images in report records bmurrin Access 12 February 11th, 2005 12:59 PM
Looping through subform records V Access VBA 8 April 20th, 2004 08:10 AM
records in subform stoneman Access 1 October 27th, 2003 11:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.