Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    1

    Unanswered: run string as command

    I would like to have VB use the value contained in a string as a command.


    Instead of...

    ad![Finished Ends Query]![Blue] = "Test"

    I would like...

    dim testTest as string
    textTest = "[Blue]"
    ad![Finished Ends Query]!<<textTest>> = "Test"

    What should I repleace <<textTest >> with to make this work?
    I have done this in other languages, but can't find out how to accomplish it in VB.

    Thanks

  2. #2
    Join Date
    Oct 2003
    Posts
    357

    Thumbs up

    Hi, try this
    Code:
    Dim str1 As String, str2 As String, textTest As String
    str1 = "ad![Finished Ends Query]!"
    textTest = "[Blue]"
    str2 = str1 & textTest & "=""Test"""
    MsgBox str2
    Madhivanan

    Failing to plan is Planning to fail

Posting Permissions

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