I have a form(frmMaintenance) that is called from the menu bar that contains a subform(department). The subform should change according to which menu item is chosen (Dept., Location, etc.) and this is the code that I have in the module being called for location:
Public Function Open_Loc()
DoCmd.OpenForm "frmMaintenance"
Forms!frmMaintenance!department!department_subform_Label.Caption = "Location"
Forms!frmMaintenance!department!department_subform.SourceObject = "location"
End Function
It gives an error saying that the field department cannot be found. Thanks for any help!!
Public Function Open_Loc()
DoCmd.OpenForm "frmMaintenance"
Forms!frmMaintenance!department!department_subform_Label.Caption = "Location"
Forms!frmMaintenance!department!department_subform.SourceObject = "location"
End Function
It gives an error saying that the field department cannot be found. Thanks for any help!!