browninaz
Ugly Data Hoarder
- Local time
- Today, 02:31
- Joined
- Oct 26, 2012
- Messages
- 88
Hello everyone,
When I update the data in frmPurchasesEquipment, I get the run-time error message:
Microsoft Access cannot find the referenced form’frmPurchasesLivestockPlants’.
I have requery code set to refresh the data in my combo boxes on 3 separate modal dialogue forms that the same data can be entered in. The problem I have is, when the event is triggered, the code is looking for forms that are not open. Here is the code:
Private Sub Form_Unload(Cancel As Integer)
Forms!frmPurchasesLivestockPlants!frmPlantLivestockPurchaseDetailsSubform!cboSetupNum.Requery
Forms!frmPurchasesHardscape!frmEquipmentPurchaseDetailsSubform!cboSetupNum.Requery
Forms!frmPurchasesEquipment!frmHardscapePurchaseDetailsSubform!cboSetupNum.Requery
End Sub
I guess the question is obvious... How do I get the requery code to work on one form without it trying to find the other forms when they are not in use?
Thanks to all that are smarter than me.
When I update the data in frmPurchasesEquipment, I get the run-time error message:
Microsoft Access cannot find the referenced form’frmPurchasesLivestockPlants’.
I have requery code set to refresh the data in my combo boxes on 3 separate modal dialogue forms that the same data can be entered in. The problem I have is, when the event is triggered, the code is looking for forms that are not open. Here is the code:
Private Sub Form_Unload(Cancel As Integer)
Forms!frmPurchasesLivestockPlants!frmPlantLivestockPurchaseDetailsSubform!cboSetupNum.Requery
Forms!frmPurchasesHardscape!frmEquipmentPurchaseDetailsSubform!cboSetupNum.Requery
Forms!frmPurchasesEquipment!frmHardscapePurchaseDetailsSubform!cboSetupNum.Requery
End Sub
I guess the question is obvious... How do I get the requery code to work on one form without it trying to find the other forms when they are not in use?
Thanks to all that are smarter than me.
Last edited: