G
Gary
I am using Access 2003
I have a field called ProductName.
The kinds of products available - appear in the following examples:
AB1000
AB900
AB1000 ST
The numbers in the product name reflect the width of the product
(millimetres).
I tried to create a query with a customized width field to extract only the
number component from the product name and then to convert this mm value to
metres. I have the following:
Width: Mid([ProductName],3,4)/1000
This works fine. But..... I have a product that only has text.
eg. ABCDEF
The width column then produces the following error: #Error for this entry.
I can understand this. All I want to be able to do is allow the calculation
to provide the number 1 when this kind of product is entered.
I have tried the following:
Width:
IIf(IsNull(Mid([ProductName],3,4)/1000),1,(Mid([ProductName],3,4)/1000))
No luck with this. Still the same error. Any help would be appreciated.
I have a field called ProductName.
The kinds of products available - appear in the following examples:
AB1000
AB900
AB1000 ST
The numbers in the product name reflect the width of the product
(millimetres).
I tried to create a query with a customized width field to extract only the
number component from the product name and then to convert this mm value to
metres. I have the following:
Width: Mid([ProductName],3,4)/1000
This works fine. But..... I have a product that only has text.
eg. ABCDEF
The width column then produces the following error: #Error for this entry.
I can understand this. All I want to be able to do is allow the calculation
to provide the number 1 when this kind of product is entered.
I have tried the following:
Width:
IIf(IsNull(Mid([ProductName],3,4)/1000),1,(Mid([ProductName],3,4)/1000))
No luck with this. Still the same error. Any help would be appreciated.