K
knowshowrosegrows
Hello Friends,
So, I have a few tables:
tblAgency
Agency_ID = PK
tblLOC
LOC_ID = PK
tblProgram
Prm_Code = PK
Agency_ID = FK
LOC_ID = FK
tblCensusEvent
CensusEvent_ID = PK
Prm_Code = FK
CensusDate
Census
Discharges
Admissions
I have a great form with subform where I use a dropdown to choose the agency
and it's program and then input the census, discharge and admission data for
a specific date. Now I want a form where I can choose the Agency and it's
Program in a similar dropdown and find that record with the census date,
census, discharge and admission data and edit it if I need to.
I have a query with the following SQL but I'm not sure how to get the form
to give me only the chosen record for the chosen agency/program for the
chosen date.
SELECT [Cap]-[Census]-[Admiss]+[D/C] AS Slots, tblCensusEvent.Census_ID,
tblCensusEvent.Prm_Code, tblCensusEvent.CensusDate, tblCensusEvent.Census,
tblCensusEvent.Admiss, tblCensusEvent.[D/C], qryCensusFieldsAll.Agency,
qryCensusFieldsAll.CareMode, qryCensusFieldsAll.CensusPhone,
qryCensusFieldsAll.CensusName, qryCensusFieldsAll.CensusContactEmail,
qryCensusFieldsAll.CareInt, qryCensusFieldsAll.CareType,
qryCensusFieldsAll.LOC_Alias, qryCensusFieldsAll.Prov_ID,
qryCensusFieldsAll.Program, qryCensusFieldsAll.LOC_Sort,
qryCensusFieldsAll.Cap, qryCensusFieldsAll.Location, qryCensusFieldsAll.Town,
qryCensusFieldsAll.CensusContact_ID, qryCensusFieldsAll.Region
FROM tblCensusEvent LEFT JOIN qryCensusFieldsAll ON tblCensusEvent.Prm_Code
= qryCensusFieldsAll.Prm_Code;
Thanks for all ideas.--
Thanks
So, I have a few tables:
tblAgency
Agency_ID = PK
tblLOC
LOC_ID = PK
tblProgram
Prm_Code = PK
Agency_ID = FK
LOC_ID = FK
tblCensusEvent
CensusEvent_ID = PK
Prm_Code = FK
CensusDate
Census
Discharges
Admissions
I have a great form with subform where I use a dropdown to choose the agency
and it's program and then input the census, discharge and admission data for
a specific date. Now I want a form where I can choose the Agency and it's
Program in a similar dropdown and find that record with the census date,
census, discharge and admission data and edit it if I need to.
I have a query with the following SQL but I'm not sure how to get the form
to give me only the chosen record for the chosen agency/program for the
chosen date.
SELECT [Cap]-[Census]-[Admiss]+[D/C] AS Slots, tblCensusEvent.Census_ID,
tblCensusEvent.Prm_Code, tblCensusEvent.CensusDate, tblCensusEvent.Census,
tblCensusEvent.Admiss, tblCensusEvent.[D/C], qryCensusFieldsAll.Agency,
qryCensusFieldsAll.CareMode, qryCensusFieldsAll.CensusPhone,
qryCensusFieldsAll.CensusName, qryCensusFieldsAll.CensusContactEmail,
qryCensusFieldsAll.CareInt, qryCensusFieldsAll.CareType,
qryCensusFieldsAll.LOC_Alias, qryCensusFieldsAll.Prov_ID,
qryCensusFieldsAll.Program, qryCensusFieldsAll.LOC_Sort,
qryCensusFieldsAll.Cap, qryCensusFieldsAll.Location, qryCensusFieldsAll.Town,
qryCensusFieldsAll.CensusContact_ID, qryCensusFieldsAll.Region
FROM tblCensusEvent LEFT JOIN qryCensusFieldsAll ON tblCensusEvent.Prm_Code
= qryCensusFieldsAll.Prm_Code;
Thanks for all ideas.--
Thanks