Formerly, any person wishing to apply for adjustment of status based on an approved I-140 immigrant visa petition (employment-based) had to satisfy the requirements of Section 245(a) which required that the I-485 applicant establish to INS that he/she had never failed to maintain nonimmigrant status.
Maintaining nonimmigrant status included NOT engaging in unauthorized employment and/or NOT allowing the I-94 to expire.
This rendered ineligible for adjustment of status a great many people who at one time had accepted unauthorized employment or allowed the I-94 to expire but who were again in lawful status with nonimmigrant visas such as H-1B, L-1, etc.
Congress, however, ameliorated this by amending the Immigration and Nationality Act to include Section 245(k).
Section 245(k) provides:
An alien who is eligible to receive an immigrant visa under …[an I-140 immigrant visa petition and other occupation based petitions] … may adjust status pursuant to subsection [245(a)].., if–
(1) the alien, on the date of filing an application for adjustment of status, is present in the United States pursuant to a lawful admission;
(2) the alien, subsequent to such lawful admission has not, for an aggregate period exceeding 180 days–
(A) failed to maintain, continuously, a lawful status;
(B) engaged in unauthorized employment; or
(C) otherwise violated the terms and conditions of the alien”s admission.
==================================