"Sigurd Bruteig" <nb****@online.no> wrote in message
news:bA********************@news2.e.nsc.no...
If i type NewRecord in some code, VB change to newrecord with lower-case
letter. If I open a new database on the same computer the NewRecord
keyword act normally. Ha anybody experienced something like this??
TIA
Sigurd
Possibly Microsoft do NOT save the actual text 'NewRecord' but change it
instead to a token. This is done in things, such as compilers, to make it
easier (for the program) to understand what is what.
For example: in BASIC you might type the following code: Let A=2:Let
B=3:Let C=A+B:Print A,B,C
The compiler [or interpreter!] could 'translate' it into something like:
@ [memory location] = 2: @ [memory location+1] = 3: @ [memory location+2] =
[memory location] + [memory location+1]: [call print routine ([memory
location], [memory location+1], [memory location+2])]
Where:
@ is the token for LET (or Store)
[memory location] is an area of RAM
[call print routine (data)] is the address of a routine to send (data) to
the printer
I realise that this is a very simplistic model - pseudo machine code would
have been better, if you knew what the code was meant to do! - but should go
to show the benefits of changing a keyword to a token.
This is what the translator does -> compiling the code. When you decompile
the code -> English, you could get a different keyword back!
e.g. in my example, LET = @ on compilation but @ = Let on decompilation, if
you see what I mean. Which is why NewRecord could become token #, whereas
token # prints as newrecord. You can see this process 'happening' when you
enter code into the VBA Editor. As soon as you complete a line VBA parses
it, 'tokenises' it, then displays it in a standard format, i.e. with extra
spaces, different colours, etc.
HTH
Nick