Unanswered: control source expression #name? error
I might have a very strange error with my access 2007-2010 edition.
I created a form which has two fields, both textfields. One is filled with a datefield from the database. The name of the textfield is datefield. The name of the field from the database is date.
The other textfield has an expression in its control source.
When I first created this textfield and type in the control source =datefield (which is then changed to =[datefield]) and I 'run' it, everything goes ok. Also when I save it and run it again, all is ok.
But when I restart my Access the second textfield has the error #Name? in it.
(Of course I don't really want the second field to repeat the first, but I got this error as well and it turned out it also was given in the above mentioned simple example).
1 - Change the name of the field in the table from "date" to something else. "Date" is a reserved word, and using reserved words as variable names in Access is prohibited.
2 - The name of the control on the form and the name of the field in the table are almost always the same. Because they aren't, in this case, is why you have grief from it when you have "=datefield," which is the control's name. You should have "= <the actual field name from the table>".
3 - You can have umpteen controls on a form with the same field name, as long as the controls' names are different.