Question about pregnancy test

I know this is going to sound dumb but I have a question. I recently took a pregnancy test because I had sex about a month ago and my period is late. It came back negative. But I also had sex the night before I took the test. Could it have effected the results?