eliminating spaces

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've been trying all the suggestions here for eliminating spaces in a query.
I've tried replace(My Last Name, " ", "") but I get nothing. So, I tried
trim(My Last Name, " ", "") with the same result. help??

Thanks,

Debbie
 
Debbie,

Is 'My Last Name' the name of a field? If so, this should work...
Replace([My Last Name]," ","")
If not, can you please say:
- What do you mena by "I get nothing"?
- Where are you putting this expression and how are you using it? (I
am assuming as part of a calculated field in the query?)
 
Hi Debbie,

you must delimit fieldnames with brackets if they contrain
spaces...

[My Last Name]

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
1st are you using this as a Criteria expression? As your criteria use - Is
Not Null.

2nd are you using this as a field expression? Try using an IIF statement, it
is works similar to a IF statement in Excell. Try - My Last Name: MY LAST
NAME: IIf([My Last Name] Is Null,"NO NAME",[My Last Name]).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top