Question about pregnancy ???

Say that you had sex the day before your period was due. Could having sex affect your period at all? Also say that you got pregnant the day before your period was due, would you still get your period?