A family of Microsoft relational database management systems designed for ease of use.
Try this --
Replace(LTrim(Replace(Replace([part number], " ", ""),"0"," "))," ","0")
Build a little, test a little.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
i have a text field that consists of spaces and leading zeros.
i want to combine the following functions into one Replace function.
Replace([Field2];" ";"")
Replace(LTrim(Replace([part number];"0";" "));" ";"0")
can i achieve that? it is important that i use only one function because i use this query in a union query.
A family of Microsoft relational database management systems designed for ease of use.
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.
Answer accepted by question author
Try this --
Replace(LTrim(Replace(Replace([part number], " ", ""),"0"," "))," ","0")
Build a little, test a little.
Can you describe what you are trying to do?
Replace(LTrim(Replace([part number];"0";" "));" ";"0") as posted would remove leading zeroes from Part Number and then replace any spaces with zeroes.
Your first expression simply removes all spaces from [Field2].
Do you want to combine the two into one string? Or are Field2 and [Part number] related somehow?
John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County
[part number] is [Field2], i apologize for the confusion.
yes, i want to combine the two function in one string.
I do not see a problem. Just try it!
Build a little, test a little.