I am working on a data base for a trucking company. What I'm having trouble with is a report that will show the information from a job and expenses that were incurred during the job. I have my job information on one table [CompCtbl] and I have the fields [PuDate],[DelDate],[Truck], (I have more fields but this is what I think is needed for my question].
On another table, I have company expenses that the costumer does not get itemized billed for. Table [Ex] with fields [EqmDate],[EqmTruckNum],[EqmTotal].
I have set up a Report bound to a query that ask for a start and end date to filter the records from the [CompCtbl] based on a Between statement on [DelDate]. So far the report is showing me what I want, All records from [CompCtbl] within the dates inputed in the system popup box.
Then I tried inserting a subreport in the detail section under the textboxes of the record linking [Truck] with [EqmTruckNum]. This is where I get half of what I want. I get my main record with a subreport under it with the expense records of the associated truck. However it shows every expense record for truck in the subreport. How can I code the subreport to pull from a date range based on my [PuDate] and [DelDate] for each record while keeping my link by Truck.
Thanks in advance!
On another table, I have company expenses that the costumer does not get itemized billed for. Table [Ex] with fields [EqmDate],[EqmTruckNum],[EqmTotal].
I have set up a Report bound to a query that ask for a start and end date to filter the records from the [CompCtbl] based on a Between statement on [DelDate]. So far the report is showing me what I want, All records from [CompCtbl] within the dates inputed in the system popup box.
Then I tried inserting a subreport in the detail section under the textboxes of the record linking [Truck] with [EqmTruckNum]. This is where I get half of what I want. I get my main record with a subreport under it with the expense records of the associated truck. However it shows every expense record for truck in the subreport. How can I code the subreport to pull from a date range based on my [PuDate] and [DelDate] for each record while keeping my link by Truck.
Thanks in advance!