During the July 2, 2007 chat session, the attorney indicated that I-485 applications received by USCIS on July 2, 2007 will NOT be denied but rejected because a visa number is not available.
That is correct.
DENIAL indicates that there USCIS received your application, accepted your application (by issuing the receipt notice), performed their checks and validations, found issues and so issued an RFE, received your response and then still found your case cannot be approved. They will then issue a Notice of Intent to Deny (NOID).
On a side note : in several cases USCIS issued a NOID without issuing RFE. These cases were always contested successfully in favor of the applicant thus forcing USCIS to issue a memo to its officers (about 2 years ago if I remember correctly) to always first issue an RFE and then issue a NOID if the RFE response is not satisfactory.
Your next step after DENIAL is to file a Motion to Reopen (MTR) or else you risk deportation.
REJECTION indicates that your application cannot be accepted. USCIS will receive your application, but find that it cannot be accepted - typically because PD is not current or necessary documents (medicals, birth certificate etc) are not attached or application is incomplete is some other way. They will therefore reject the application and the 485 packet will be returned to you.
Your next step after a rejection is to remove the reason for rejection (ie wait for PD to be current or attach any missing documents or rectify the incomplete app) and then re-submit the SAME 485 packet.
So, my question is: Are the I-485 applications accepted only when visa numbers are available?
Yes. Please understand that visa number availability serves two purposes. Primary purpose is to allow USCIS to approve already filed 485s. Secondary purpose is to allow people to file their 485s.
A simple analogy is the gas tank of a car. As the car keeps consuming gas (485 approvals) you need to keep topping it up (fresh 485s).
If the answer is yes, do all the pending I-485s have a visa number allocated even if they are not approved for years together?
Pending 485s DO NOT have visa number allocated. They entered the system simply because they were "acceptable" based on PD. Then USCIS will perform the necessary checks and validations and on successful completion, they become "approvable" at which point they are ready for visa number allocation. Once the number is allocated, it essentially means the case is closed and the PR card is issued.
Hope this helps ....
Cheers !!