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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform not returning all records

Status
Not open for further replies.

NeilT123

Technical User
Jan 6, 2005
302
GB
I have a master form based on a query qryIfTDrillingDates.

Code:
SELECT tblSLTFarm.FarmAccountNumber, tblSLTRpt.CroppingYear
FROM tblSLTRpt, tblSLTFarm
GROUP BY tblSLTFarm.FarmAccountNumber, tblSLTRpt.CroppingYear;

There can be multiple records in the query but at the moment there are 2 as i have selected 2 customers by FarmAccountNumber

My subform is also based on a query which returns 13000 records
Code:
SELECT tblFieldDetails.FieldName, tblCropping.FieldCode, tblCropping.CropOrder, tblCropping.DrillingDate, tblCropping.CroppedArea, tblFarmerDetails.FarmAccountNumber, tblCropping.VarietyID, tblCropping.FertRecStatus, tblCropping.ActualYield, tblCropping.TargetYield, tblCropping.PlanningNUseComment, tblCropping.NRateStatus, tblCropping.CroppingYear
FROM (tblFarmerDetails INNER JOIN tblFieldDetails ON tblFarmerDetails.FarmAccountNumber = tblFieldDetails.FarmAccountNumber) INNER JOIN tblCropping ON tblFieldDetails.FieldCode = tblCropping.FieldCode
ORDER BY tblFieldDetails.FieldName, tblCropping.CropOrder;

and the Link Master Fields / Link Child Fields are set at CroppingYear;FarmAccountNumber.

The problem is that the subform is only returning the records from one of the selected customers not both.

Can anyone suggest what might be wrong and how I get the records for both customers showing in the subform?

Thank
 
The Link Master/Child typically filters the subform to a single record returned from the main form. This would be the Current record only.

If you want to see the child records of all the records in the main form, you will need to implement some other filtering and clear the Link Master/Child properties.

Duane
Hook'D on Access
MS Access MVP
 
OK thanks Duane. I suspected as much.

Neil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top