[SOLVED] String in Access Expression Builder giving error


I’m attempting to concatenate the current year "2022" with two words (i.e. 2022 My Example) in the Expression Builder of Microsoft access.

I’m using the control source field with dynamically creating the year with a the set string phrase of "My Example"

=FormatDate(Date(),"yyyy") + [My Example]

I keep getting the error: "The expression you entered contains invalid syntax. Can anyone shed light on why this is happening?


I’m not sure what FormatDate() is unless this is a function you’ve written yourself. You may have meant to use simply Format(). Also you’ll want to use quote characters " instead of brackets [] to concatenate a string:

=Format(Date(),"yyyy") + "My Example"

Answered By – deluxeinformation

Answer Checked By – Willingham (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *