Edit: this thread was previously named 'Error with saving record on Unload event'. Renamed after original issue was resolved and new related question came up. See post #17.
I get the The command or action 'SaveRecord' isn't available now. error from the Unload event of a subform in my navigation subform when I close the Main form, but not when I switch from the tab to another tab. I have a function that runs perfectly when switching from that tab to another, and the first step in the function is DoCmd.RunCommand acCmdSaveRecord, but that step can't execute when closing the Main form while that tab is activated (due to the Unloading process). The rest of the function still performs in either case (it's just some update queries), just not that first saverecord step. There are buttons on this same tab to open reports but need to run the same function before opening the reports, which is why I put the saverecord step in the function.
I get the The command or action 'SaveRecord' isn't available now. error from the Unload event of a subform in my navigation subform when I close the Main form, but not when I switch from the tab to another tab. I have a function that runs perfectly when switching from that tab to another, and the first step in the function is DoCmd.RunCommand acCmdSaveRecord, but that step can't execute when closing the Main form while that tab is activated (due to the Unloading process). The rest of the function still performs in either case (it's just some update queries), just not that first saverecord step. There are buttons on this same tab to open reports but need to run the same function before opening the reports, which is why I put the saverecord step in the function.
Last edited: