Share via

Remove dash in query

Anonymous
2015-02-18T04:44:49+00:00

My sample record in acctno field is as follow:-

10100-67-123456-78

In a query how do i remove the dash without replacing (delete) the record.

Thanks

Microsoft 365 and Office | Access | For home | 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

Answer accepted by question author

Anonymous
2015-02-18T05:03:50+00:00

If you want to keep the dashes in the record in the table, but just display the acctno without dashes in a query (or a form or report), you can put a calculated field in the query by typing

NewAcctno: Replace([Acctno], "-", "")

Acctno 10100-67-123456-78 will be displayed as 101006712345678.

If you actually want to permanently remove the dashed from the field, keeping just the numbers, just use the same expression in an Update query.

Was this answer helpful?

5 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful