Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform returns only one matching record

Status
Not open for further replies.

Tyskie19

Technical User
Feb 13, 2005
14
CA
For instance, I made the subform so that upon entering a customer number that customer's address will show in the subform. The problem is sometimes customers use more than one address. However when I select a customer who has more than 1, the subform will only show one, how do i make it so that all are shown?
 
Hi
Have you set your subform to continuous forms? Is the record counter showing that you have more than one record? What are you linking on?

And just in case ??
 
I set it as a datasheet. It does not show or say there is more than one record. I am linking it through the customer number, and I've checked the table, and there are multiple records for the same customer number
 
Hi
Please forgive me hounding you for a bit. Would it be worth trying setting up a test form? Set the Record Source to (eg) tblCustomer and put the (eg) Customer_Id field on the form. Make sure the Wizard button is clicked. Choose the Subform tool. When the wizard pops up choose existing tables and queries and then click Next. Select the table containing addresses. Add a few fields and make sure that the link fields are set to Customer_ID for both the form and subform. The wizard should create an appropriate subform.
I know this is a bit basic, but getting back to basics may show where the problem is. :)
 
I've tried a number of things and sometimes the field gives me only one record, while sometimes it gives me a list of a tonne of others that aren't even supposed to show up, I've no idea what's goin on.
 
Hi
Ok, so you have tblCustomer, which looks like:
[underline]Field[/underline]
Customer_ID
Customer_LastName

And you have tblAddresses, which looks like:
[underline]Field[/underline]
Address_ID
Address_Customer_ID
Address_Street

Your form has the following properties:
Record Source: tblCustomer

Your subform has the following properties:
Source Object: tblAddresses
Link Child Fields: Address_Customer_ID
Link Master Fields: Customer_ID

If any of this is not true, it may point up the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top