The president will attend the National Rifle Association event Friday in Dallas. His rhetoric on guns and other issues in recent months has not been matched by action.
The U.S. District Court judge put his decision on hold for 90 days to give the Department of Homeland Security time to provide a better explanation as to why the program is unlawful.
The ruling means immigrants protected under the Deferred Action for Childhood Arrivals program will have to pay up to three times what they've been paying to enroll in classes starting in summer.
The legislation is said to include nearly $1.6 billion in border security increases without addressing a legal fix for the roughly 700,000 immigrants who stand to lose protection under DACA.
The court said the government's appeal on the Obama-era Deferred Action for Childhood Arrivals program should be heard by a court of appeals first. Trump had wanted to end the program by March 5.