jazminecat
Programmer
Hi, I"ve inherited a database with some issues.
I have the following query:
which populates a form that my user uses daily.
tbl main is related to tbl fed in a one to one relationship on wccontract, with wccontract being the primary key in *both* tables. I feel this is bad design, since this number is entered by the enduser, rather than autogenerated by access. But I can't change it all overnight..
However, I'd like to avoid having to redesign the entire thing. I'm not sure if thats possible as there a lots of lookups in the main table to other tables. . .
at any rate, first things first. This query behaves strangely. It populates the form, but if my user adds information to cfda, the value in the wccontract field is deleted. This only happens if a record is created which has a value in wccontract, and no value in cfda, which is a regular occurrence. If there is already something in cfda, changing it doesn't cause the problem. Just if the record is saved with cfda being blank.
Can anyone tell me why this would happen, and how to fix it?
Thank you!!
I have the following query:
Code:
SELECT tbl_main.wccontract, tbl_fed.cfda, tbl_main.title, tbl_main.desc, tbl_main.origgrantawd, tbl_main.amendgrantawd, tbl_main.begdate
FROM (tbl_main LEFT JOIN tbl_fed ON tbl_main.wccontract = tbl_fed.wccontract) LEFT JOIN (tbl_agencies RIGHT JOIN tbl_gcontacts ON tbl_agencies.vendorid = tbl_gcontacts.vendorid) ON tbl_main.gcontact = tbl_gcontacts.gcontact;
which populates a form that my user uses daily.
tbl main is related to tbl fed in a one to one relationship on wccontract, with wccontract being the primary key in *both* tables. I feel this is bad design, since this number is entered by the enduser, rather than autogenerated by access. But I can't change it all overnight..
However, I'd like to avoid having to redesign the entire thing. I'm not sure if thats possible as there a lots of lookups in the main table to other tables. . .
at any rate, first things first. This query behaves strangely. It populates the form, but if my user adds information to cfda, the value in the wccontract field is deleted. This only happens if a record is created which has a value in wccontract, and no value in cfda, which is a regular occurrence. If there is already something in cfda, changing it doesn't cause the problem. Just if the record is saved with cfda being blank.
Can anyone tell me why this would happen, and how to fix it?
Thank you!!