Results 1 to 3 of 3

Thread: Got A Challenge 4U

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2000
    Posts
    156

    Talking

    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
    The MORE I get to know,
    I realize that I know NOTHING !

  2. #2
    Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    53
    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!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2000
    Posts
    156
    tnx mate

    very helpfull

    lirlir
    The MORE I get to know,
    I realize that I know NOTHING !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width