MSAccess VBA - Help on query

Anonymous
2025-07-08T13:16:33+00:00

Dear All,

I have imported the below Excel sheet into an MSAccess table:

As you can see the length of the two value should be 19 but, due to an accidental char (maybe carriage returns), I have 20 in the first row.

This is an issue because when I import the above table in an accdb file I did not find a way to remove this strange char.

From here you can download a copy to check my issue

Thanks

Microsoft 365 and Office | Access | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Accepted answer
  1. Anonymous
    2025-07-08T13:31:22+00:00

    You can use a function such as the one found at https://www.devhut.net/unveiling-the-hidden-characters-in-your-strings/ to output the character representation of each string to see, and eliminate hidden characters.

    You can use Replace() to eliminate individual characters either via VBA, or better yet, through an UPDATE query.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful