Context. Numerous complex organic molecules have been detected in the universe and among them are amides, which are considered as prime models for species containing a peptide linkage. In its backbone, acrylamide (CH 2 CHC(O)NH 2 ) bears not only the peptide bond, but also the vinyl functional group that is a common structural feature in many interstellar compounds. This makes acrylamide an interesting candidate for searches in the interstellar medium. In addition, a tentative detection of the related molecule propionamide (C 2 H 5 C(O)NH 2 ) has been recently claimed toward Sgr B2(N). Aims. The aim of this work is to extend the knowledge of the laboratory rotational spectrum of acrylamide to higher frequencies, which would make it possible to conduct a rigorous search for interstellar signatures of this amide using millimeter wave astronomy. Methods. We measured and analyzed the rotational spectrum of acrylamide between 75 and 480 GHz. We searched for emission of acrylamide in the imaging spectral line survey ReMoCA performed with the Atacama Large Millimeter/submillimeter Array toward Sgr B2(N). We also searched for propionamide in the same source. The astronomical spectra were analyzed under the assumption of local thermodynamic equilibrium. Results. We report accurate laboratory measurements and analyses of thousands of rotational transitions in the ground state and two excited vibrational states of the most stable syn form of acrylamide. In addition, we report an extensive set of rotational transitions for the less stable skew conformer. Tunneling through a low energy barrier between two symmetrically equivalent configurations has been revealed for this higher-energy species. Neither acrylamide nor propionamide were detected toward the two main hot molecular cores of Sgr B2(N). We did not detect propionamide either toward a position located to the east of the main hot core, thereby undermining the recent claim of its interstellar detection toward this position. We find that acrylamide and propionamide are at least 26 and 14 times less abundant, respectively, than acetamide toward the main hot core Sgr B2(N1S), and at least 6 and 3 times less abundant, respectively, than acetamide toward the secondary hot core Sgr B2(N2). Conclusions. A comparison with results of astrochemical kinetics model for related species suggests that acrylamide may be a few hundred times less abundant than acetamide, corresponding to a value that is at least an order of magnitude lower than the observational upper limits. Propionamide may be as little as only a factor of two less abundant than the upper limit derived toward Sgr B2(N1S). Lastly, the spectroscopic data presented in this work will aid future searches of acrylamide in space.