Princessboko
Board Regular
- Joined
- Nov 3, 2002
- Messages
- 73
I'm a new Access user and don't understand why I get this error.
I'm creating a form that has direct relationships to 3 tables. When I go into the Query Builder I've selected the fields I want and run the query and it works fine...UNTIL I get out of the design view to check out the form. Then I get the "Syntax error in FROM clause" error.
Here's my SQL Statement.
SELECT Employees.EmployeeID, Employees.EmpNID, Employees.[Case Number], Employees.F_name, Employees.L_name, Employees.St_address, Employees.City, Employees.State, Employees.Zipcode, Employees.Phone, Employees.Dept, Employees.Job_cat, Source.SourceID, Source.EmployeeID, Source.[Source Name], Source.Source_uknwn, Source.Attending_dr, Source.Known_Hiv, Source.History_IV, Source.Man_w_man, Source.Comm_swkr, Source.No_above, Source.HepB, Source.HepC, Source.HIV, Source.Date_hepb, Source.Date_hepC, Source.Date_hiv, Source.Results_hepb, Source.Results_hepc, Source.Results_hiv, Source.EH_RN, Baseline_Test.BaselineID, Baseline_Test.SourceID, Baseline_Test.Employ_Not, Baseline_Test.Source_doc_not, Baseline_Test.HBV_exposure, Baseline_Test.AB_level, Baseline_Test.AB_test_date, Baseline_Test.Test_done, Baseline_Test.Hepb, Baseline_Test.Hepb_drdate, Baseline_Test.Hepc, Baseline_Test.HepC_drdate, Baseline_Test.HIV, Baseline_Test.Consent_sign, Baseline_Test.HIV_drdate, Baseline_Test.Clot_study, Baseline_Test.Clot_drdate, Baseline_Test.ResultsID, Baseline_Test.Sum_date, Baseline_Test.PEP, Baseline_Test.hepb_vac, Baseline_Test.booster_dose1, Baseline_Test.med_name, Baseline_Test.med_date, Baseline_Test.record_dose, Baseline_Test.record_route, Baseline_Test.site_r, Baseline_Test.site_l, Baseline_Test.Date_given, Baseline_Test.Comment, Baseline_Test.[6wk], Baseline_Test.[6mth]
FROM (Employees INNER JOIN Source ON Employees.EmployeeID = Source.EmployeeID) INNER JOIN Baseline_Test ON Source.SourceID = Baseline_Test.SourceID;
HELP PLEASE - I'm loosing my hair over this thing!
I'm creating a form that has direct relationships to 3 tables. When I go into the Query Builder I've selected the fields I want and run the query and it works fine...UNTIL I get out of the design view to check out the form. Then I get the "Syntax error in FROM clause" error.
Here's my SQL Statement.
SELECT Employees.EmployeeID, Employees.EmpNID, Employees.[Case Number], Employees.F_name, Employees.L_name, Employees.St_address, Employees.City, Employees.State, Employees.Zipcode, Employees.Phone, Employees.Dept, Employees.Job_cat, Source.SourceID, Source.EmployeeID, Source.[Source Name], Source.Source_uknwn, Source.Attending_dr, Source.Known_Hiv, Source.History_IV, Source.Man_w_man, Source.Comm_swkr, Source.No_above, Source.HepB, Source.HepC, Source.HIV, Source.Date_hepb, Source.Date_hepC, Source.Date_hiv, Source.Results_hepb, Source.Results_hepc, Source.Results_hiv, Source.EH_RN, Baseline_Test.BaselineID, Baseline_Test.SourceID, Baseline_Test.Employ_Not, Baseline_Test.Source_doc_not, Baseline_Test.HBV_exposure, Baseline_Test.AB_level, Baseline_Test.AB_test_date, Baseline_Test.Test_done, Baseline_Test.Hepb, Baseline_Test.Hepb_drdate, Baseline_Test.Hepc, Baseline_Test.HepC_drdate, Baseline_Test.HIV, Baseline_Test.Consent_sign, Baseline_Test.HIV_drdate, Baseline_Test.Clot_study, Baseline_Test.Clot_drdate, Baseline_Test.ResultsID, Baseline_Test.Sum_date, Baseline_Test.PEP, Baseline_Test.hepb_vac, Baseline_Test.booster_dose1, Baseline_Test.med_name, Baseline_Test.med_date, Baseline_Test.record_dose, Baseline_Test.record_route, Baseline_Test.site_r, Baseline_Test.site_l, Baseline_Test.Date_given, Baseline_Test.Comment, Baseline_Test.[6wk], Baseline_Test.[6mth]
FROM (Employees INNER JOIN Source ON Employees.EmployeeID = Source.EmployeeID) INNER JOIN Baseline_Test ON Source.SourceID = Baseline_Test.SourceID;
HELP PLEASE - I'm loosing my hair over this thing!