See the result of text in text box (1 Viewer)

MyTech

Access VBA
Local time
Today, 03:52
Joined
Jun 10, 2010
Messages
108
I have 2 Fields:
1. [Message]
2. [Result]

I want to see in [Result] the result of the text in [Message].

Text in [Message] is "Application.Printer.DeviceName" (w/o Quotes).

Double Click VBA for [Message] is:

Private Sub Message_DblClick(Cancel As Integer)
Result = [Message]
End Sub​

I expect now to see in [Result] the name of my default printer.
but no, I just get there the text as it's in the text box "Application.Printer.DeviceName".


Any help please?
 

boblarson

Smeghead
Local time
Today, 00:52
Joined
Jan 12, 2001
Messages
32,059
1. Result is an Access Reserved Word.

2. You have to use Eval with it:

Eval([Message])
 

MyTech

Access VBA
Local time
Today, 03:52
Joined
Jun 10, 2010
Messages
108
here you are again Bob,

Thank you thiiiiiiiiis much. :)
 

smig

Registered User.
Local time
Today, 10:52
Joined
Nov 25, 2009
Messages
2,209
aviod names that might be reserved words
 

Users who are viewing this thread

Top Bottom