Re: Data Source for a Sub-Report

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 02/20/05


Date: Sun, 20 Feb 2005 15:32:28 -0500

Can you apply a filter to the subreport?

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Don" <someone@somewhere.net> wrote in message 
news:O2Ryog4FFHA.3972@TK2MSFTNGP15.phx.gbl...
> It might be beneficial to describe the problem before going into details 
> of
> the problem .......
>
> The main report lists details about all positions within the company.
> Included is a list of people who are assigned to that position.  Normally,
> only one person is assigned, but sometimes due to promotions, retirements,
> transfers, etc two people might be assigned to the same position.  Each
> position in the position table has a unique ID number (in field 
> PositionID),
> and the record for each individual has a position field (PositionID) in
> which the appropriate position number is placed.
>
> Currently the report uses a SQL string to get the position data for the
> report (Me.RecordSource = strSQL) from a table called tblPosition.  On the
> report is a sub-report that has information about the employees assigned 
> to
> the position which gets its data from a table called tblPersonnel.  The
> sub-form is linked to the main form using the PositionID field of the SQL 
> in
> the main form and PositionID field of tblPersonnel which is the data 
> source
> for the sub-form.
>
> The folks that use this report have asked for some variations of this
> report.  For example, a report containing only cases where the position is
> assigned to a particular department (in tblPosition) and the employee is
> assigned to a different department (in tblPersonnel).  To get this data I
> have created an SQL query that provides all the results.  However, the
> sub-form is still getting its data directly from tblPersonnel, so if the
> position has two people assigned to it, one in the same department as the
> position and the other in a different department, both are listed!
>
> What I am thinking, but don't know how to proceed is to have the sub-form
> only use data flowed down to it from the main form.  The problem being how
> to link the sub-form to that data and not tblPersonnel.
>
> Am I barking up the wrong tree here?  Any ideas?
>
> Thanks!
>
> Don
>
>
>
> 


Relevant Pages

  • Re: Data Source for a Sub-Report
    ... > The main report lists details about all positions within the company. ... > the position which gets its data from a table called tblPersonnel. ... > sub-form is linked to the main form using the PositionID field of the SQL ...
    (microsoft.public.access.formscoding)
  • Data Source for a Sub-Report
    ... The main report lists details about all positions within the company. ... the position which gets its data from a table called tblPersonnel. ... the main form and PositionID field of tblPersonnel which is the data source ... for the sub-form. ...
    (microsoft.public.access.reports)
  • Data Source for a Sub-Report
    ... The main report lists details about all positions within the company. ... the position which gets its data from a table called tblPersonnel. ... the main form and PositionID field of tblPersonnel which is the data source ... for the sub-form. ...
    (microsoft.public.access.formscoding)
  • Re: Need help with changing values in a form, by row number
    ... runs off of the current records in the sub-form. ... text box (the text box is to display the child records). ... We need to grab child records FOR EACH OF the top forms records. ... Ouch!!1 Why now are we talking about a report? ...
    (microsoft.public.access.forms)