Hi Everyone,
I'm relatively new to Access 2000 and have been struggling with this one for a while.
I have a table tblWasteData with the following fields:
INDUSTRY_CODE
WASTE_CODE
WASTE_PROD
I have a query that currently picks out records from tblWasteData where INDUSTRY_CODE matches data in a text box (txtIndCode) on a form.
The results from this query will show records relating to one industry type only. However, WASTE_CODE varies for these records.
I would like to run the query so that it does the above and also does the following:
* creates a new column WASTE_PROD2 (the values in this column will be used later in another query to perform a calculation)
* the values in this column will equal those in WASTE_PROD if WASTE_CODE equals data in cboWasteCode on the form. If WASTE_PROD does NOT equal the value in cboWasteCode then a zero "0" should be entered into WASTE_PROD2.
My SQL so far:
SELECT tblWasteData.INDUSTRY_CODE, tblWasteData.WASTE_CODE, tblWasteData.WASTE_PROD
FROM tblWasteData
WHERE tblWasteData.INDUSTRY_CODE = Forms!MyForm!txtIndCode;
I hope someone can help....
TIA
I'm relatively new to Access 2000 and have been struggling with this one for a while.
I have a table tblWasteData with the following fields:
INDUSTRY_CODE
WASTE_CODE
WASTE_PROD
I have a query that currently picks out records from tblWasteData where INDUSTRY_CODE matches data in a text box (txtIndCode) on a form.
The results from this query will show records relating to one industry type only. However, WASTE_CODE varies for these records.
I would like to run the query so that it does the above and also does the following:
* creates a new column WASTE_PROD2 (the values in this column will be used later in another query to perform a calculation)
* the values in this column will equal those in WASTE_PROD if WASTE_CODE equals data in cboWasteCode on the form. If WASTE_PROD does NOT equal the value in cboWasteCode then a zero "0" should be entered into WASTE_PROD2.
My SQL so far:
SELECT tblWasteData.INDUSTRY_CODE, tblWasteData.WASTE_CODE, tblWasteData.WASTE_PROD
FROM tblWasteData
WHERE tblWasteData.INDUSTRY_CODE = Forms!MyForm!txtIndCode;
I hope someone can help....
TIA