True or False

T

tony wong

Question 1

i run the following code but return "Null" to me.
why not true or false?
******** immediate windows *****************
? Forms!FrmApplicant!FrmOfficer!assignee <> assignperson
Null

Question 2

i have the following code at the beginning but i run "? assignperson" in
immediate windows, it return nothing to me.
why assignperson is not "tony" as currentuser, what's wrong with my code?
Thanks a lot for assisting me.

************
Dim assignperson As String
assignperson = CurrentUser()

******** immediate windows *****************
? assignperson

? currentuser
tony
 
A

Allen Browne

A1 True/False/Null

Think of Null as meaning Unknown. The result of a comparision containing a
null will be a null (i.e. the result is unknown). Called "null propagation",
this is a very important concept.

This is one of six issues discussed in this article:
Common errors with Null
at:
http://members.iinet.net.au/~allenbrowne/casu-12.html


A2 Scope
If you declare a variable inside a procedure, its scope is limited to the
procedure. Further, its lifetime is limited to when the procedure is
running. If you pause the procedure while it is running (e.g. press F9 to
create a break point, and then run it), you will be able to see the contents
of your variable at that point.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top