FSHOTT said:
Dirk Thank for you attention to my Questions. Hopefully I can provide the
info to make this sowewhat more clear. The Record Source statement in my
Edit Form is as follows:
Record Source for Purchasing Data Edit Form
SELECT DISTINCT SWSRecordNo, * FROM qryPurchasingTable3 WHERE
((MyYear=Forms!frmDataEditForm1!cboYear) Or
(Forms!frmDataEditForm1!cboYear
Is Null)) And ((MyMonth=Forms!frmDataEditForm1!cboMonth) Or
(Forms!frmDataEditForm1!cboMonth Is Null)) And
(SupplierNo=(Left(Forms!frmDataEditForm1!cboSupplier,6)) Or
((Left(Forms!frmDataEditForm1!cboSupplier,6)) Is Null));
There's your problem right there: "SELECT DISTINCT". Any time you use the
DISTINCT keyword in a query, the results will not be updatabase. You only
use DISTINCT when you want to remove duplicates in your result set, but
doing so renders the query nonupdatable, because any field value in the
result set can no longer be traced back to a single record in a table.
Do you have a need to remove duplicates? If so, then there is no way to
make this form updatabe. Assuming you don't, then try this SQL for the
RecordSource instead:
SELECT * FROM qryPurchasingTable3
WHERE
((MyYear=Forms!frmDataEditForm1!cboYear)
Or (Forms!frmDataEditForm1!cboYear Is Null))
And ((MyMonth=Forms!frmDataEditForm1!cboMonth)
Or (Forms!frmDataEditForm1!cboMonth Is Null))
And ((SupplierNo=Left(Forms!frmDataEditForm1!cboSupplier,6))
Or (Forms!frmDataEditForm1!cboSupplier Is Null));
I simplified it a bit, as well as removing the DISTINCT keyword. I may have
messed up those parentheses, though, so don't panic if that doesn't work.