bob bisquick
Registered User.
- Local time
- Yesterday, 20:43
- Joined
- Nov 8, 2002
- Messages
- 37
"Join Expression Not Supported"
Does anyone know what this error means?
I have several possible places I think it might be coming from...
1) I have one database on my computer that runs on Access 97, but using a runtime version of 97. Everything else I do runs on 2000. Lately, some (but not all) of my databases have been displaying a 97 icon, not a 2000 icon. Could there be some kind of conflict/missing reference?
RE: a Access 2000 db
2)There could be an error in the code, but I don't know how to find out where. The code begins with 4 DELETE statements, and then an SELECT statement, which contains my first join. But when I run the code, I should see warnings for each DELETE statement, and I don't, so I don't think it is even getting as far as the first join anyway.
'Clear Out Tables
DoCmd.RunSQL "DELETE [005-Header].* FROM [005-Header];"
DoCmd.RunSQL "DELETE [005-Race].* FROM [005-Race];"
DoCmd.RunSQL "DELETE [005-Ethnicity].* FROM [005-Ethnicity];"
DoCmd.RunSQL "DELETE [005-Age].* FROM [005-Age];"
'001-Create Patient List
'001-Patients Who Received Service
DoCmd.RunSQL "SELECT service.service_type_rfk, patient.ptn_pk, patient.ptn_dob, patient.ptn_gender_rfk, " & _
"patient.ptn_race_white, patient.ptn_race_black, patient.ptn_race_asian, patient.ptn_race_pacific, patient.ptn_race_indian, " & _
"patient.ptn_race_other, patient.ptn_race_unknown, patient.ptn_ethnicity_rfk INTO [001-AllPatients] " & _
"FROM StartEnd_tbl, patient INNER JOIN service ON patient.ptn_pk = service.service_ptn_fk " & _
"WHERE (((service.service_type_rfk) = [StartEnd_tbl].[service_pk]) And ((service.service_date) >= [StartEnd_tbl].[StartDate] And " & _
"(service.service_date) <= [StartEnd_tbl].[EndDate])) " & _
"GROUP BY service.service_type_rfk, patient.ptn_pk, patient.ptn_dob, patient.ptn_gender_rfk, patient.ptn_race_white, " & _
"patient.ptn_race_black, patient.ptn_race_asian, patient.ptn_race_pacific, patient.ptn_race_indian, patient.ptn_race_other, " & _
"patient.ptn_race_unknown, patient.ptn_ethnicity_rfk;"
3)On the form from which all of the code is run (press a button and the code runs, etc...) there is a combo box. This combo box contains a join statement in the row source, but in GUI format, this does not create an error.
SELECT sub_service.sub_sr_pk, sub_service.sub_sr_name
FROM services_provided INNER JOIN sub_service ON services_provided.srv_pr_pk = sub_service.sub_sr_type_rfk;
Any thoughts where this error might come from?
Does anyone know what this error means?
I have several possible places I think it might be coming from...
1) I have one database on my computer that runs on Access 97, but using a runtime version of 97. Everything else I do runs on 2000. Lately, some (but not all) of my databases have been displaying a 97 icon, not a 2000 icon. Could there be some kind of conflict/missing reference?
RE: a Access 2000 db
2)There could be an error in the code, but I don't know how to find out where. The code begins with 4 DELETE statements, and then an SELECT statement, which contains my first join. But when I run the code, I should see warnings for each DELETE statement, and I don't, so I don't think it is even getting as far as the first join anyway.
'Clear Out Tables
DoCmd.RunSQL "DELETE [005-Header].* FROM [005-Header];"
DoCmd.RunSQL "DELETE [005-Race].* FROM [005-Race];"
DoCmd.RunSQL "DELETE [005-Ethnicity].* FROM [005-Ethnicity];"
DoCmd.RunSQL "DELETE [005-Age].* FROM [005-Age];"
'001-Create Patient List
'001-Patients Who Received Service
DoCmd.RunSQL "SELECT service.service_type_rfk, patient.ptn_pk, patient.ptn_dob, patient.ptn_gender_rfk, " & _
"patient.ptn_race_white, patient.ptn_race_black, patient.ptn_race_asian, patient.ptn_race_pacific, patient.ptn_race_indian, " & _
"patient.ptn_race_other, patient.ptn_race_unknown, patient.ptn_ethnicity_rfk INTO [001-AllPatients] " & _
"FROM StartEnd_tbl, patient INNER JOIN service ON patient.ptn_pk = service.service_ptn_fk " & _
"WHERE (((service.service_type_rfk) = [StartEnd_tbl].[service_pk]) And ((service.service_date) >= [StartEnd_tbl].[StartDate] And " & _
"(service.service_date) <= [StartEnd_tbl].[EndDate])) " & _
"GROUP BY service.service_type_rfk, patient.ptn_pk, patient.ptn_dob, patient.ptn_gender_rfk, patient.ptn_race_white, " & _
"patient.ptn_race_black, patient.ptn_race_asian, patient.ptn_race_pacific, patient.ptn_race_indian, patient.ptn_race_other, " & _
"patient.ptn_race_unknown, patient.ptn_ethnicity_rfk;"
3)On the form from which all of the code is run (press a button and the code runs, etc...) there is a combo box. This combo box contains a join statement in the row source, but in GUI format, this does not create an error.
SELECT sub_service.sub_sr_pk, sub_service.sub_sr_name
FROM services_provided INNER JOIN sub_service ON services_provided.srv_pr_pk = sub_service.sub_sr_type_rfk;
Any thoughts where this error might come from?