Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The EVAL function
Message
From
22/06/2001 11:43:20
 
 
To
22/06/2001 10:10:40
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00522089
Message ID:
00522532
Views:
7
I tried this

Dim oSC As ScriptControl
Set oSC = New ScriptControl
oSC.Language = "VBScript"
Dim y As String
y = "AutomationLetterWordDemo.txtCustomerName.Text"
y = oSC.Eval(y)

and this

Dim oSC As ScriptControl
Set oSC = New ScriptControl
oSC.Language = "VBScript"
Dim y As String
y = "AutomationLetterWordDemo.txtCustomerName.Text"
y = oSC.Eval("y")

and this

Dim oSC As ScriptControl
Set oSC = New ScriptControl
oSC.Language = "VBScript"
Dim y As String
y = oSC.Eval("AutomationLetterWordDemo.txtCustomerName.Text")

All three produce null strings ( "" )

AutomationLetterWordDemo.txtCustomerName.Text is a valid control on the form on top of the code.



Where is need to go with this is to get a value from a recordset, using something like this...

Dim oSC As ScriptControl
Set oSC = New ScriptControl
oSC.Language = "VBScript"
Dim y As String
y = oSC.Eval(rstReplaceCodes.Fields("ReplaceWithFieldName").Value)

where rstReplaceCodes.Fields("ReplaceWithFieldName").Value is equal to another value in a record set ( "rstSQLResultSet.Fields("ColumnName").Value" )

Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform