Full Version: Simple Syntax Question
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
Mink
Below is a code that I want to use to pass the values of two boxes into one box on a new form. I know my syntax is bad so the command will not work, but can you please suggest the correct syntax?

I am getting with this code a "You can't assign a value to this object" error.

[Forms]![frmEngineerECN]![ReleaseDate] = Me.cboYear & "-" & Me.txtECN

Thanks in advance!
Mink
MattJ
The following worked for me:

Dim strYear as String
Dim strECN as String
strYear = Me.cboYear
strECN = Me.txtECN

[Forms]![frmEngineerECN]![ReleaseDate] = strYear & "-" & strECN

HTH
Matt
Mink
Thank you very much! After finding out that I also had the code on the wrong event I got rid of the other error as well.
MattJ
Your welcome!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.