Hi All,
I am trying to lookup up a cell value from excel to a recordset in my db. Some of the cells in excel have values like 002I, 003T which are text fields but some are 002, 003.
My rs field is a text field from a table. When the lookup happens vba sees 002, 003 as 2, 3 so the value is not matched in my rs. how do i preserve the zero's so the match is found??
tried this...
...but it doesn;t work.
Anyone???
Thanks, Spin.
I am trying to lookup up a cell value from excel to a recordset in my db. Some of the cells in excel have values like 002I, 003T which are text fields but some are 002, 003.
My rs field is a text field from a table. When the lookup happens vba sees 002, 003 as 2, 3 so the value is not matched in my rs. how do i preserve the zero's so the match is found??
tried this...
Code:
If CStr(Trim(xlSht.Range(colRef_service & iRow).Value)) = rs1!service_ID Then
Anyone???
Thanks, Spin.