Princessboko
Board Regular
- Joined
- Nov 3, 2002
- Messages
- 73
I have a database that I'm trying to build a form for. I go into the Query Builder and select all the fields I want to be on the form. Before I leave the Query Builder I run the query and see all the fields. When I leave the Query Builder and try to look at the form I get this error:
"The SELECT statement includes a reserved word or an argument name that is misspellec or missing, or the punctuation is incorrect"
Here's my statement:
SELECT Employees.EmployeeId, Employees.CaseNumber, Employees.FName, Employees.LName, Employees.StAddress, Employees.City, Employees.State, Employees.Zipcode, Employees.Phone, Employees.Dept, Employees.JobCat, Employees.Description, Source.SourceID, Source.EmployeeID, Source.SourceName, Source.SourceUknwn, Source.AttendingDr, Source.KnownHiv, Source.HistoryIV, Source.ManWMan, Source.CommWkr, Source.NonAbove, Source.SourceHepB, Source.SourceHepC, Source.SourceHIV, Source.DateHepb, Source.DateHepC, Source.DateHiv, Source.SourceResultsHepB, Source.SourceResultsHepC, Source.SourceResultsHiv, Source.EHRN, BaselineTest.BaselineID, BaselineTest.SourceID, BaselineTest.EmployNot, BaselineTest.SourceDocNot, BaselineTest.HBVExposure, BaselineTest.BaseABLevel, BaselineTest.ABTesDate, BaselineTest.TestDone, BaselineTest.BaseHepb, BaselineTest.HepbDrDate, BaselineTest.BaseHepc, BaselineTest.HepCDrDate, BaselineTest.BaseHIV, BaselineTest.ConsentSign, BaselineTest.HIVDrDate, BaselineTest.ClotStudy, BaselineTest.ClotDrDate, BaselineTest.ResultsID, BaselineTest.SumDate, BaselineTest.Pep, BaselineTest.HepbVac, BaselineTest.Comment, BaselineTest.SixWk, Results.ResultsID, Results.BaselineId, Results.HIVSixWDue, Results.HIVSixWDone, Results.HIVResult, Results.HIVTwelvWDue, Results.HIVTwelvWDone, Results.HIVTwelvWResult, Results.HIVSixMDue, Results.HIVSixMDone, Results.HIVSixMResult, Results.HBABDue, Results.HBABDone, Results.HBABResult, Results.HBABTwoDue, Results.HBABTwoDone, Results.HBABTwoResult, Results.LiverDue, Results.LiverDone, Results.LiverResult, Results.ResultComment
FROM ((Employees INNER JOIN Source ON Employees.EmployeeId = Source.EmployeeID) INNER JOIN BaselineTest ON Source.SourceID = BaselineTest.SourceID) INNER JOIN Results ON BaselineTest.BaselineID = Results.BaselineId;
I've looked at this so much I can't see the error. Any suggestions would be most appreciated.
Thanks!
"The SELECT statement includes a reserved word or an argument name that is misspellec or missing, or the punctuation is incorrect"
Here's my statement:
SELECT Employees.EmployeeId, Employees.CaseNumber, Employees.FName, Employees.LName, Employees.StAddress, Employees.City, Employees.State, Employees.Zipcode, Employees.Phone, Employees.Dept, Employees.JobCat, Employees.Description, Source.SourceID, Source.EmployeeID, Source.SourceName, Source.SourceUknwn, Source.AttendingDr, Source.KnownHiv, Source.HistoryIV, Source.ManWMan, Source.CommWkr, Source.NonAbove, Source.SourceHepB, Source.SourceHepC, Source.SourceHIV, Source.DateHepb, Source.DateHepC, Source.DateHiv, Source.SourceResultsHepB, Source.SourceResultsHepC, Source.SourceResultsHiv, Source.EHRN, BaselineTest.BaselineID, BaselineTest.SourceID, BaselineTest.EmployNot, BaselineTest.SourceDocNot, BaselineTest.HBVExposure, BaselineTest.BaseABLevel, BaselineTest.ABTesDate, BaselineTest.TestDone, BaselineTest.BaseHepb, BaselineTest.HepbDrDate, BaselineTest.BaseHepc, BaselineTest.HepCDrDate, BaselineTest.BaseHIV, BaselineTest.ConsentSign, BaselineTest.HIVDrDate, BaselineTest.ClotStudy, BaselineTest.ClotDrDate, BaselineTest.ResultsID, BaselineTest.SumDate, BaselineTest.Pep, BaselineTest.HepbVac, BaselineTest.Comment, BaselineTest.SixWk, Results.ResultsID, Results.BaselineId, Results.HIVSixWDue, Results.HIVSixWDone, Results.HIVResult, Results.HIVTwelvWDue, Results.HIVTwelvWDone, Results.HIVTwelvWResult, Results.HIVSixMDue, Results.HIVSixMDone, Results.HIVSixMResult, Results.HBABDue, Results.HBABDone, Results.HBABResult, Results.HBABTwoDue, Results.HBABTwoDone, Results.HBABTwoResult, Results.LiverDue, Results.LiverDone, Results.LiverResult, Results.ResultComment
FROM ((Employees INNER JOIN Source ON Employees.EmployeeId = Source.EmployeeID) INNER JOIN BaselineTest ON Source.SourceID = BaselineTest.SourceID) INNER JOIN Results ON BaselineTest.BaselineID = Results.BaselineId;
I've looked at this so much I can't see the error. Any suggestions would be most appreciated.
Thanks!