convert data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a base source Table1 with EquipmentID and description fields as text:
EquipmentID Description
00875 ....
0545
PLD125
....
and I have a list of EquipmentID with product from a different source but as
numbers for EquipmentID:
EquipmentID Product
875 ....
545
....
The combination of letters and numbers are not used in the second
EquipmentID list and for now can be omitted.

To create a simple query with these two equipment lists to get Product,
EquipmentID, and Description I'm converting the EquipmentID from the Table1
by using CLng(). But, because of letters I have #Error for some rows. I'm
trying to put in Criteria something like IsError(CLng(EquipmentID)) = False
to don't take the rows with error but it's not working.

Could anybody advise how I could link those two fields?

Thanks
 
Alex:

A couple observations. You may want to try something like the following for
the EquipmentID in Table 1:

CLng(Right([EquipmentID],3))

The IsError function performs a different function than the purpose you are
applying it for. An alternative approach would be the following:

IsNumeric(CLng(Right([EquipmentID],3))) = True

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I have a base source Table1 with EquipmentID and description fields as text:
EquipmentID Description
00875 ....
0545
PLD125
....
and I have a list of EquipmentID with product from a different source but as
numbers for EquipmentID:
EquipmentID Product
875 ....
545
....
The combination of letters and numbers are not used in the second
EquipmentID list and for now can be omitted.

To create a simple query with these two equipment lists to get Product,
EquipmentID, and Description I'm converting the EquipmentID from the Table1
by using CLng(). But, because of letters I have #Error for some rows. I'm
trying to put in Criteria something like IsError(CLng(EquipmentID)) = False
to don't take the rows with error but it's not working.

Could anybody advise how I could link those two fields?

Thanks
 
Back
Top