Its almost as if Access is recognizing these calculated numbers as strings.
It is. I recreated the issue using SQL Server 2005 and Access 2010. I have a View in SQL Server named [CaseLotView] ...
CREATE VIEW [dbo].[CaseLotView]
AS
SELECT
CaseLot,
Drums,
GrossWeight,
[%H2O],
GrossWeight - 19.6 * Drums AS NetWeight,
(GrossWeight - 19.6 * Drums) * (100 - [%H2O]) / 100 AS DryWeight
FROM
dbo.CaseLotData
...and when I create a linked table in Access and open it I see the following:
Notice that the [NetWeight] value is right-aligned (interpreted as numeric) while the [DryWeight] value is left-aligned (interpreted as string).
One workaround would be to create an Access query based on the linked table that converts [DryWeight] to numeric using the CDbl()
function:
SELECT
dbo_CaseLotView.CaseLot,
dbo_CaseLotView.NetWeight,
CDbl([DryWeight]) AS dblDryWeight
FROM dbo_CaseLotView;
Reports based on that query will recognize [dblDryWeight] as numeric and offer the expected formatting options.
(Note that while there is a CDec()
function in VBA it does not work in Access queries - ref: here.)