update by adding a right space padding to string (2 Viewers)

Smiley 3636

New member
Local time
Today, 15:16
Joined
Oct 15, 2023
Messages
18
Hi



I would appreciate is some help the following of adding spaces in front of a string based upon another value.

I have a table with the following

MListName_________________HeadList
Revenue & Sales________________0
Livestock Sales & Costs_________1
Primary Production Income_____1

What I am trying to achieve is the following

MListName____________________HeadList
Revenue & Sales___________________0
__Livestock Sales & Costs___________1
__Primary Production Income_______1
(without the underline)
Using a update query (which I don’t seem to get work)

UPDATE 1dbtCOAMenu SET [1dbtCOAMenu].MListName = Right([MListName] & Space(2),2);
 
No need for any function call, just concatenate a space like so:

= " " & MListName

However, in your example, why doesn't Revenue & Sales get the space as well?
 

Users who are viewing this thread

Back
Top Bottom