Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The EVAL function
Message
From
22/06/2001 11:51:57
 
 
To
22/06/2001 11:43:20
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00522089
Message ID:
00522538
Views:
7
I meant to the value inside of the text box. In your example, do something like:
AutomationLetterWordDemo.txtCustomerName.Text = Chr(34) & AutomationLetterWordDemo.txtCustomerName.Text & Chr(34)

Where Chr(34) is the double quote character.

But, if you just need to have a variable field name from the recordset just play with the actual field name and put that in the variable:
myField = "ReplaceFieldName"
y = Rs.Fields(myField).Value

>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
Reply
Map
View

Click here to load this message in the networking platform