I have to agree with CG...it seems very bizarre they way you have set up your tables, and the example data you've provided. The closest I could come with a SQL Query was:
SELECT CodeTimeIn.Code, CodeTimeIn.TimeIn, TimeOut, CodeTimeIn.AttendanceDate
FROM (SELECT Code, AttendanceDate, AttendanceTime as TimeIn
FROM test
WHERE Status=1) AS CodeTimeIn
INNER JOIN
(SELECT Code,AttendanceDate, AttendanceTime as TimeOut
FROM test
WHERE Status=0) As CodeTimeOut
ON ((CodeTimeIn.Code=CodeTimeout.Code) AND (CodeTimeIn.AttendanceDate=CodeTimeOut.AttendanceDate))
but, it doesn't work the way you want. (it joins the second 1003 entry with the first one and the third 1003 entry with the first one.