Results 1 to 3 of 3

Thread: Using Variables In Where Queries

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    37

    Exclamation

    I am trying to write an sql where query which will retrieve a group of records based upon a variable which was assigned earlier in the program.

    The variable is global, but everytime I run the program I get missing parameters.

    The following is the Sql I am using

    "Select * From [OInspect] Where AgentID = AgentNo"
    AgentId is a field in the table AgentNo is the Global variable
    Has anyone got any suggestions????

  2. #2
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    hows about this??

    "Select * From [OInspect] Where AgentID = " & AgentNo

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    37

    Wink

    Thanks alot Jimbob, that worked great.

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