Help with a SELECT

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I have some troubles trying to put the semicolon """ to
((tblComputers.AssetTag) = (tvwcomputers.AssetTag)) both are text and the
full select is:

sql = "SELECT tblComputers.AssetTag, tblComputers.ManufacturerID,
tblComputers.DateReceived, " & _
"tblComputers.PurchasePrice, tblComputers.Warranty, tblComputers.EmployeeID
" & _
"FROM tblComputers INNER JOIN tvwComputers ON tblComputers.AssetTag =
tvwComputers.AssetTag " & _
"WHERE " & ((tblComputers.AssetTag) = (tvwcomputers.AssetTag))


Thanks
 
Hi Orlando,

I don't understand why you have the WHERE clause in your SQL string - it's
exactly what the INNER JOIN is doing. All you need is:

sql = "SELECT tblComputers.AssetTag, tblComputers.ManufacturerID,
tblComputers.DateReceived, " & _
"tblComputers.PurchasePrice, tblComputers.Warranty, tblComputers.EmployeeID
" & _
"FROM tblComputers INNER JOIN tvwComputers ON tblComputers.AssetTag =
tvwComputers.AssetTag;"

Note the closing semicolon in the last substring.

HTH,

Rob
 
Back
Top