-
Hi There,
Long Time NO wrote...
Let say u'v got a DB :
field1 is the ID , field2 is a string that represent a
function or a condition like
if %X%>3 then
bla bla bla
end if
i would like to get the field2 out of the table and than
some how (i don't know how) to Execute the condition/function trough VB or ELSE...
do u have any idea how to do this ?
Good Luck...
LirLir
-
Hi,
You probably want to have a look at the script control, add the following code to a form containing a Script Control (ScriptControl1) and a text box (textbox1):
Option Explicit
Public x As Integer
Private Sub Form_Load()
Dim code$
code = "sub Test()" & vbCrLf & " if x > 3 then text1 = ""Big"" else text1 = ""Little"" " & vbCrLf & " end sub"
x = 2
With ScriptControl1
.Language = "VBScript"
.AddObject "ME", Me, True
.AddCode code
.Run "Test"
End With
End Sub
Hope this starts you off in the right direction!
-
tnx mate
very helpfull
lirlir