Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi! I'm getting the following error with access. From what I could tell with the other formulas in the query, this should work.

" is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. What is wrong?

I used the template of an existing field to put this one together. I'm looking for it to become an email address.

User Name: [Left(staff.FirstName,20)& (".")&Left(staff.LastName,20)&("@valleycentralschools.org")]

What I have tried:

User Name: [Left(staff.FirstName,20)&(".")&Left(staff.LastName,20)&("@valleycentralschools.org")]
Posted
Updated 28-Mar-16 6:36am

"is not a valid name" means that your column name is invalid, not the data you are trying to put into it.
Spaces are not valid in column names unless you surround them with square brackets
i.e. [User Name]
Better would be to avoid spaces altogether
e.g. UserName
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 28-Mar-16 17:51pm    
5ed.
—SA
Solution Found. Formula should equal: Left([staff.FirstName],20)& (".")&Left([staff.LastName],20)&("@valleycentralschools.org")

I just had incorrect brackets. Thanks for all who looked.
 
Share this answer
 
Comments
CHill60 29-Mar-16 5:47am    
That would have produced a different error to the one you reported!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900