Results 1 to 3 of 3

Thread: More SQL

  1. #1

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

    Post

    Thanks but when I run it it is telling me I have too few parameters and I don't know what else to try. The first sql statement (sql) does work but sql3 has 'too few parameters'. What to do?

    PS See I am trying to click on a find button which pulls info from multiple tables but I cannot get it to pull info from a second table into textboxes on my form.

    Private Sub cmdGoFind_Click()
    Dim db As Database
    Dim tb As Recordset
    Dim tb11 As Recordset
    Dim tb20 As Recordset
    Dim sql As String
    Dim Sql2 As String
    Dim SQL3 As String

    Set db = DBEngine.OpenDatabase("S:\Dbapps\Repo\RepoInv", False, False)
    sql = ("Select * from RepoInventory where [Account Number] = " & "'" & txtFindAccount.Text & "'")

    SQL3 = ("SELECT Auctions.* FROM Auctions, RepoInventory WHERE Auctions.AuctionID = RepoInventory.AuctionID")

    Set tb = db.OpenRecordset(sql)
    Set tb20 = db.OpenRecordset(SQL3)

  2. #2

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

    Post

    I am trying to write an SQL that will basically do what the following says but this is not working. What do I need?

    Sql3 = ("Select * from Auctions where AuctionID = AuctionID from RepoInventory")

  3. #3
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    Try:

    SQL3 = "SELECT Auctions.* FROM Auctions, RepoInventory WHERE Auctions.AuctionID = RepoInventory.AuctionID"

    ------------------
    Aaron Young
    Analyst Programmer
    aarony@redwingsoftware.com
    ajyoung@pressenter.com


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