Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21096

syntax error

$
0
0
hey
im trying to show a customer details from 3 tables in access each time i press on the cust to show it in datareport and i get message syntax error query

this is the code i put
Code:

  If Not FrmCusts.LsVw.SelectedItem Is Nothing Then
Set RptCust.DataSource = CN.Execute("SELECT AppID, AppDate, Apptime, AppCust, AppHrDr, AppSerivce, FullName from Appointments, Customers, HairDressers ,HairName  " & _
  "WHERE ID= AppID " & FrmCusts.LsVw.SelectedItem.Tag & "ORDER BY  by AppDate")
  RptCust.show 1
End Sub

this is the table of the customers
Code:

Id,Fullname,address,datebirth,facebook,email,phone,cellular,haircoor,oxygen,photo
this is the table of HairDressers
Code:

HairID,Hairname
and this is the table of Appointments
Code:

AppID,appdate,apptime,appcust,apphrdrappservice
tnx in advanced

Viewing all articles
Browse latest Browse all 21096

Trending Articles