im getting a error type mismatch when i try to get the history of a customer
cant find exactly where is the mismatch
![Name: 123.jpg
Views: 33
Size: 294.0 KB]()
this is my code
this are the tables:
Appointments
AppID
AppDate
AppCust
AppHair
AppTimein
AppTimeout
AppTreatment
AppRemarks
--------------
HairDressers
HairID
HairName
tnx in advanced
cant find exactly where is the mismatch
this is my code
Code:
Dim strSQL As String
Dim lngVal As Long
lngVal = CLng(FrmCusts.LsVw.SelectedItem.Tag)
strSQL = "SELECT "
strSQL = strSQL & "Appointments.AppID,"
strSQL = strSQL & "Appointments.AppDate,"
strSQL = strSQL & "Appointments.AppCust,"
strSQL = strSQL & "Appointments.AppHair,"
strSQL = strSQL & "Appointments.AppTimein,"
strSQL = strSQL & "Appointments.AppTimeout,"
strSQL = strSQL & "Appointments.AppTreatment,"
strSQL = strSQL & "Appointments.AppRemarks,"
strSQL = strSQL & "Customers.FullName,"
strSQL = strSQL & "HairDressers.HairName"
strSQL = strSQL & " FROM Appointments, Customers, HairDressers "
strSQL = strSQL & " WHERE Customers.ID = " & CStr(lngVal)
strSQL = strSQL & " AND Appointments.AppCust = Customers.ID"
strSQL = strSQL & " AND HairDressers.HairID = Appointments.AppHair"
MsgBox strSQL
Set RptCust.DataSource = CN.Execute(strSQL)
RptCust.Show 1
this are the tables:
Appointments
AppID
AppDate
AppCust
AppHair
AppTimein
AppTimeout
AppTreatment
AppRemarks
--------------
HairDressers
HairID
HairName
tnx in advanced