@Nico
Do you appreciate that the resultant string from your code will have spaces around the value and between the single-quotes (')?
Also, the question doesn't make it very clear unfortunately, but from a quick perusal I assume the code being played with is to set a field within a query. If that is true then it is essentially SQL, so wouldn't recognise the word "Me". I may be misinterpreting this, but I guess if it starts with an "=" it must be somewhere outside of VBA. It's very unlike you to make such errors so I'm half expecting I've missed an important point, but I'd be interested to hear what it is if so - even if I do end up embarrassed :-D
Do you appreciate that the resultant string from your code will have spaces around the value and between the single-quotes (')?
Also, the question doesn't make it very clear unfortunately, but from a quick perusal I assume the code being played with is to set a field within a query. If that is true then it is essentially SQL, so wouldn't recognise the word "Me". I may be misinterpreting this, but I guess if it starts with an "=" it must be somewhere outside of VBA. It's very unlike you to make such errors so I'm half expecting I've missed an important point, but I'd be interested to hear what it is if so - even if I do end up embarrassed :-D
Comment