Problems caused by spaces in the field and management names

Obviously, including spaces in table names, field names, and control names is a bad idea (since it is used as a delimiter in almost all imperative programming languages, today it is used for commercial purposes *). You must surround those controls and fields with [], etc. I am trying to demonstrate one more problem with spaces for someone else.

I seem to recall that there is a situation that may arise where, since the field name has a space in it (for example, “Foo ID”), and the control based on it is also called “Foo ID”, which you can end, randomly referencing a base field instead of a control.

for example, you update the Foo identifier from empty to hello world, and then you need to check the null value until the record is saved; something like "me. [Foo ID]" returns Null instead of "Hello World"

How can I duplicate this unexpected behavior?

(* - Lisp, Prolog and APL are not required programming languages)

+3
source share
1 answer

, , (.. Me.Foo_ID), . , Me.Foo_ID , Me![Foo ID] . ( : Me![Foo ID] control "Foo ID".)

, . , : Me.Controls("Foo ID") Me![Foo ID], . , : Me.Foo_ID.

Me.Foo_ID "Hello World" ( Dirty), Me![Foo ID] Null.

EDIT: , ( ).

, (, , - ).

+1

Source: https://habr.com/ru/post/1795796/


All Articles