Results 1 to 3 of 3

Thread: SQL and recordset Problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    Greenville
    Posts
    73

    Post

    I have been trying to get this to work for days: When I set this SQL to open in the tb13 recordset below and then later to fill in textboxes that come from the LocationTracking table it is telling me
    "Too Few Paramters. Expected 1."
    Any Help:

    Sql2 = ("Select * from LocationTracking, RepoInventory Where locationtracking.AccountNumber = Repoinventory.accountnumber and repoinventory.accountnumber = '" & txtFindAccount.Text & "'")

    Set tb13 = db.OpenRecordset(Sql2)

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    It can mean that you misspelled field name or a table name or didn't pass the value for your parameter, which is impossible in you case, because you're not using stored procedures or compiled queries. Check field and table names in your SQL Statement.

    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

  3. #3
    New Member
    Join Date
    Feb 2000
    Location
    Belgrade, YU
    Posts
    4

    Post

    Maybe it is happening because you forgot to put ; sign at the end of your query. I mean:

    Sql2 = ("...'" & txtFindAccount.Text & "';")

    ------------------
    Kameni

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