SparkyP
asked on
Refresh Combo Box on Subform
I have a main form that has details of Jobs (frmJobReports). This has a tab page with a subform that allows us to provide a price breakdown for any additional costs.
The main form details the equipment we are working on based on the site. There could be any number of pieces of equipment on any site. If we carrying out general maintenance on the Site, we have an equipment record called "SiteNameGeneral".
The costing subform is used to provide quotations against specific equipment on the site.
I use the following code in a query to lookup all plant for that site in a combobox. This works fine first time round, but if a scroll records in the main form and then use the dropdown in the subform combo the records remain on the origin records detail.
SELECT EquipmentList.Plant
FROM EquipmentList
WHERE (((EquipmentList.Site)=[fo rms]![Job Reports]![cboSite]) AND ((EquipmentList.Archived)= "No"));
I have tried every which way with requeries, but cannot get it to work.
Many thanks in anticipation.
The main form details the equipment we are working on based on the site. There could be any number of pieces of equipment on any site. If we carrying out general maintenance on the Site, we have an equipment record called "SiteNameGeneral".
The costing subform is used to provide quotations against specific equipment on the site.
I use the following code in a query to lookup all plant for that site in a combobox. This works fine first time round, but if a scroll records in the main form and then use the dropdown in the subform combo the records remain on the origin records detail.
SELECT EquipmentList.Plant
FROM EquipmentList
WHERE (((EquipmentList.Site)=[fo
I have tried every which way with requeries, but cannot get it to work.
Many thanks in anticipation.
ASKER
Thanks for prompt response
To be clear the Control of the subform, is the name you would see if you looked at the tab order of the form?
Which event would you assign the requery, and on which control?
Many thanks
To be clear the Control of the subform, is the name you would see if you looked at the tab order of the form?
Which event would you assign the requery, and on which control?
Many thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the explanations. Works just as I wanted it. Really appreciate your patience.
me.NameOfyourSubformCONTRO
Note that "NameOfYourSubformCONTROL"