Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    47

    Lightbulb Unanswered: DoCmd.RunSQL question

    Sup ya'll

    Can I use VB variables in DoCmd.RunSQL statement? I don't seem to find a way to do that.

    Thanks.
    F..ck it, gimme a beer... Jimi Hendrix RULES!

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Let's call your variable strSomeText. A SQL statement containing that
    variable would look like:

    "Select *
    From SomeTable
    Where SomeField = '" & strSomeText & "'"
    Inspiration Through Fermentation

Posting Permissions

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