Yes, you can buy an HDB flat after selling your condo, but you need to wait out a 30-month period from the effective date of disposal (i.e., date of legal completion of the sale of your Executive Condominium). This is evidenced by the Notice of Transfer or other documentary evidence as required by HDB.