I have Main form with two sub form for Gatepass of the employees.
All the forms have relationship with the field name [Civil ID#].
Main form has only one field with name [Civil ID#]
The 1st sub form has different fields:
[Civil ID#], [Name], [Occupation] etc…
The 2nd sub form has following fields:
[Civil ID#], [Gate pass starting Data], [Gate passes Ending Date] etc...
There are more than one Gate passes in 2nd sub form for one employee in different dates like:
Civil ID# Gatepass starting Date Gatepass Ending Date
12345 2009/06/10 2009/12/30
12345 2010/01/01 2010/06/30
I want to print a report by clicking specific record in 2rd subform. For example I want to print the gatepass report for the Gatepass starting Date “2010/01/01” Gatepass Ending Date “2010/06/30”, then automatically print out a report after flirting information from other forms.
I made a query with the help of relation tables and the report is giving information as i required, But the problem is I have to enter [Civil ID#] and [Gate pass staring Date], [Gate pass Ending Date] then it filter the record and preview the record. I just want to click the required record of the Gatepass duration in the 2nd Subform it should autometically filter the information and preview the report.