Search code examples
excelvbams-accessms-access-2013ms-access-2016

How to convert recordset.field to a string


I am currently attempting to compare certain values in a column from a query in access to a vector of strings to look for a match between any two values.

I used recordset.fields("column1") to access specific records from my desired column, but it seems like I am unable to get matches since the values are of different data types.

How do I convert the records from recordset.fields("column1") into a string?

Thanks!


Solution

  • If you are working in VBA, surround your value with the CStr() function which will return the value converted to string output.