Solved Data show in subform based on dropdown list

kashifshahzad

New member
Local time
Today, 09:33
Joined
Jul 18, 2023
Messages
5
Could someone help me, to create a dropdown list of date (Month and year) in shed form as per attached. and based on dropdown list the sub form shows the relevant data. Thanks in advance.
 

Attachments

How about two dropdowns, one for year and one for month?
 
There are two fields that have dates. One in the Feed table and one in the MedicineDetails table. My understanding is that you want to filter these sub-forms based up a dropdown control to be placed in the Shed form. The dropdown should show the month and year only and then filter based upon the selected month and year. Is that correct?
 
There are two fields that have dates. One in the Feed table and one in the MedicineDetails table. My understanding is that you want to filter these sub-forms based up a dropdown control to be placed in the Shed form. The dropdown should show the month and year only and then filter based upon the selected month and year. Is that correct?
yes it's correct.
In 'MesicineDetails' table there is a field 'Date Administered' I want to match drop down list with it.
In 'BirdDetails' table there 'Month' field defined. please add 'Year' fiels also. i want to match 'Month' and 'year' field with drop down list
In 'Feed' table there is 'DateofBuying' fields i want to match it with drop down list
 
There are two fields that have dates. One in the Feed table and one in the MedicineDetails table. My understanding is that you want to filter these sub-forms based up a dropdown control to be placed in the Shed form. The dropdown should show the month and year only and then filter based upon the selected month and year. Is that correct?
O/P already given code in crossposted thread.
 
yes it's correct.
In 'MesicineDetails' table there is a field 'Date Administered' I want to match drop down list with it.
In 'BirdDetails' table there 'Month' field defined. please add 'Year' fiels also. i want to match 'Month' and 'year' field with drop down list
In 'Feed' table there is 'DateofBuying' fields i want to match it with drop down list
The month field in BirdDetails is meaningless. Delete it. You can only filter and search dates if there is a date field on a form that is bound to a table or query field formatted as a date. So you can filter based upon DateADministered or DateOfBuying, but not 'Month' in the BirdDetails table. Each record in the BirdDetails table should NOT have a field that is the name of any month.

In addition, if you are going to filter sub-forms by any criteria, then you will need to disable the Master/Child sub-form links temporarily and then re-establish them when you unfilter the sub-forms. If you don't disable the links, only a portion of the sub-form records may be returned by the filtering process.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom