How would I set more than two parameters in SQL statement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bluethunder
    New Member
    • Sep 2007
    • 50

    How would I set more than two parameters in SQL statement

    Good day!

    I'm having a problem with my program with regards of retrieving the data from the tables. I'm using VB 6 and Access 2007 as back end. I'm using the Data Environment SQL statement command when I tried to set more than two parameters it gaves me an error of:

    "The specified field 'brandno' could refer to more than one table listed in the from clause of your SQL Statement"

    Code:
    select [charge form].*, [personal information].*, branch.*, brand.* from (([charge form] inner join [personal information] on [charge form].employeeno = [personal information].employeeno) inner join branch on [charge form].branchno = branch.branchno) inner join brand on [charge form].brandno = brand.brandno where datefrom = ? and dateto = ? and brandno = ? and branchno = ?
    Is there anyone who can help me? Your help is highly appreciated.
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    Do you think the query is okay?

    I did work with Access and VB before(2 years ago) cant recall any SQL query like that.

    It does not matter

    what is that mean "[charge form].*"

    Comment

    • bluethunder
      New Member
      • Sep 2007
      • 50

      #3
      I already figure out what is the problem.

      Comment

      Working...