T
Tony K
I'm note sure how to state this but, I have a Windows form that contains 2
tables. Details View on top and Datagrid on the bottom. The two tables are
related. One of the fields in the details view is a calculated field not
stored in the database. It needs to be calculated when any of 3 columns in
the datagrid are changed.
problem 1: What event for the datagrid is triggered when a cell is modified
AFTER it has loaded?
CellValueChanged or DataMemberChanged does not seem to work because one or
the other are triggered when the form is loaded.
problem 2: Any of the columns can contain null values. How do I write a
SQL statement to ignore null values. If there is at least one value in each
of the 3 columns, the statement below works great. Here is a glimse of my
SQL statement:
SELECT SUM(UnitsReceived) - SUM(UnitsSold) - SUM(UnitsShrinkage) AS
UnitsOnHand
FROM [Inventory Transactions]
WHERE (ProductID = ?)
The database is MSAccess. I downloaded it from Microsoft as a template for
inventory control and modified to my needs.
Thanks,
Tony
tables. Details View on top and Datagrid on the bottom. The two tables are
related. One of the fields in the details view is a calculated field not
stored in the database. It needs to be calculated when any of 3 columns in
the datagrid are changed.
problem 1: What event for the datagrid is triggered when a cell is modified
AFTER it has loaded?
CellValueChanged or DataMemberChanged does not seem to work because one or
the other are triggered when the form is loaded.
problem 2: Any of the columns can contain null values. How do I write a
SQL statement to ignore null values. If there is at least one value in each
of the 3 columns, the statement below works great. Here is a glimse of my
SQL statement:
SELECT SUM(UnitsReceived) - SUM(UnitsSold) - SUM(UnitsShrinkage) AS
UnitsOnHand
FROM [Inventory Transactions]
WHERE (ProductID = ?)
The database is MSAccess. I downloaded it from Microsoft as a template for
inventory control and modified to my needs.
Thanks,
Tony