I have two hypotheses. The first is that the error message you report isn't actually a Windows message, but just something that's formatted in a style similar to what Microsoft uses. You haven't quoted it exactly or presented a screen shot, so it's impossible for us to judge precisely what it is.
My second hypothesis is that when you installed Ubuntu on the first disk, you did not completely wipe the Windows files from the EFI System Partition (ESP), which is where boot loaders reside on an EFI-based computer. This caused no immediate problems because your Ubuntu installation set EFI variables in NVRAM to point to the Ubuntu boot loader (GRUB) as the default, so the Windows boot loader was not activated. When you swapped your disks, though, your EFI noticed that the Ubuntu boot loader was not available and so deleted its entry from the NVRAM. When you swapped the disks back, the firmware relied on hard-coding of the Windows boot loader's location as a fallback, since it had no entries in NVRAM that worked, and the Windows boot loader sprang back to life.
The second hypothesis seems more likely to me. If it's correct, the solution is to re-create your Ubuntu/GRUB boot loader entry. This can be done in any number of ways. The simplest from a computer perspective is to boot an emergency system and use a tool like
bcfg (in an EFI shell) or
efibootmgr (in Linux) to re-create that missing entry. This requires a moderate amount of expertise, though; see this page for a summary. A simpler solution from a human perspective is to use Ubuntu's Boot Repair tool, which will re-install GRUB and set the new GRUB as the default. Another option is to install another EFI boot loader; several are available, and if you have problems with GRUB, getting another one to work may be easier than fixing GRUB, which is quite arcane and complex to set up manually.