Hey guys, i'm trying to create a database in Access, but i'm having problems, keep getting the same error, i've gone through it so many times but cannot see whats wrong with it, i'm getting a syntax error which highlights at the start of the Enrolment table, any help would be much appreciated:-
CREATE TABLE Student
(StudentNo VARCHAR (6) NOT NULL,
Name VARCHAR (22) NOT NULL,
DateofBirth DATE,
ModuleCode VARCHAR (6) NOT NULL,
RoomNo VARCHAR (6) NOT NULL,
LecturerNo VARCHAR (6) NOT NULL,
StudentMark NUMBER,
CONSTRAINT Student_StudentNo_pk PRIMARY KEY (StudentNo),
CONSTRAINT Student_EnrolmentNo_fk FOREIGN KEY (EnrolmentNo) REFERENCES Enrolment (EnrolmentNo));
CREATE TABLE Enrolment
(EnrolmentNo VARCHAR (6),
ModuleCode VARCHAR (6),
YearofEnrolment DATE,
CONSTRAINT Enrolment_EnrolmentNo_pk PRIMARY KEY (EnrolmentNo),
CONSTRAINT Enrolment_ModuleCode_fk FOREIGN KEY (ModuleCode) REFERENCES Module (ModuleCode),
CONSTRAINT Enrolment_StudentNo_fk FOREIGN KEY (StudentNo) REFERENCES Student (StudentNo));
CREATE TABLE Module
(ModuleCode VARCHAR (6) NOT NULL,
ModuleName VARCHAR (22) NOT NULL,
StudentNo VARCHAR (6) NOT NULL,
LecturerNo VARCHAR (6) NOT NULL,
RoomNo VARCHAR (6) NOT NULL,
CONSTRAINT Module_ModuleCode_pk PRIMARY KEY (ModuleCode),
CONSTRAINT Module_RoomNo_fk FOREIGN KEY (RoomNo) REFERENCES Room (RoomNo),
CONSTRAINT Module_LecturerNo_fk FOREIGN KEY(LecturerNo) REFERENCES Lecturer (LectuerNo),
CONSTRAINT Module_EnrolmentNo_fk FOREIGN KEY(EnrolmentNo) REFERENCES Enrolment (EnrolmentNo));
CREATE TABLE Lecturer
(LecturerNo VARCHAR (6) NOT NULL,
Name VARCHAR (22) NOT NULL,
Surname VARCHAR (22) NOT NULL,
DateofBirth DATE,
ModuleCode VARCHAR (6) NOT NULL,
RoomNo VARCHAR (6) NOT NULL,
CarReg VARCHAR (7) NOT NULL,
CONSTRAINT Lecturer_LecturerNo_pk PRIMARY KEY (LecturerNo),
CONSTRAINT Lecturer_ModuleCode_fk FOREIGN KEY (ModuleCode) REFERENCES Module (ModuleCode));
CREATE TABLE Room
(RoomNo VARCHAR (6) NOT NULL,
RoomType VARCHAR (22) NOT NULL,
RoomCapacity NUMBER NOT NULL,
ModuleCode VARCHAR (6) NOT NULL,
CONSTRAINT Room_RoomNo_pk PRIMARY KEY (RoomNo),
CONSTRAINT Room_ModuleCode_fk FOREIGN KEY (ModuleCode) REFERENCES Module (ModuleCode));