Narrative:

Our takeoff clearance from tower mentioned traffic about 7 miles out at 4;000' was a C172 inbound for landing. I intended to climb quickly over traffic and sidestep to the left of where I understood the traffic would be. The captain made [traffic] call outs from TCAS information on the mfd and we realized we were on a collision course and not able to climb over him. I made more of an effort to level off [quicker] with a slight descent. At our closest moment I saw him diving in a right turn towards us as we flew by him. I saw the top of his wing; turning towards us with the TCAS saying monitor vertical speed. We cleared him by 400 feet. I wouldn't have accepted takeoff clearance if I had known he was 3-4 miles out on a straight in visual approach to either runway that we were departing.

Google
 

Original NASA ASRS Text

Title: An unidentified air carrier aircraft on initial climb experienced a close encounter with an inbound C-172.

Narrative: Our takeoff clearance from tower mentioned traffic about 7 miles out at 4;000' was a C172 inbound for landing. I intended to climb quickly over traffic and sidestep to the left of where I understood the traffic would be. The Captain made [traffic] call outs from TCAS information on the MFD and we realized we were on a collision course and not able to climb over him. I made more of an effort to level off [quicker] with a slight descent. At our closest moment I saw him diving in a right turn towards us as we flew by him. I saw the top of his wing; turning towards us with the TCAS saying monitor vertical speed. We cleared him by 400 feet. I wouldn't have accepted takeoff clearance if I had known he was 3-4 miles out on a straight in visual approach to either runway that we were departing.

Data retrieved from NASA's ASRS site as of April 2012 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.