Problem with subform showing too many records

  • Thread starter Thread starter Tony Williams
  • Start date Start date
T

Tony Williams

I have a main form based on "tblmonth" which has a control "txtmonthlabela"
(based on a field of the same name) My subform based on a query
"qryFDAsubform" which is based on my table "tblmaintabs" has a field
"txtmonthlabel" which connects it to the main form and also a combo control
called "txtcompany" which is based on a field of the same name from my table
"tblmaintabs" to identify the data..
The sub form shows data for companies who submit figures for the month. Some
companies don't submit data every month. However as I run through the
records my subform shows the company name whether or not they have submitted
data. I only want the data to show for a company in any one month if they
have submitted data.
Can anyone point me in the right direction?
TIA
Tony
 
Hi, Tony.

Open your query in design view, right click on the join and change the Join
property to "Only Include Rows Where the Two Fields Are Equal" (an Inner
Join).

Hope that helps.
Sprinks
 
In design view of the main form, select the subform control and verify the
Link Child Fields and Link Parent Fields properties are set. They are under
the Data tab on the properties window.

Tony Vrolyk
 
Thanks for that
Tony
Sprinks said:
Hi, Tony.

Open your query in design view, right click on the join and change the Join
property to "Only Include Rows Where the Two Fields Are Equal" (an Inner
Join).

Hope that helps.
Sprinks
 
Thanks, I'll check that
Tony
Tony Vrolyk said:
In design view of the main form, select the subform control and verify the
Link Child Fields and Link Parent Fields properties are set. They are under
the Data tab on the properties window.

Tony Vrolyk
 
Back
Top