คือว่า Code sql นะคะ
Sql = "SELECT DailyRpt.*, Result_Meeting.Result_Meeting_Name FROM DailyRpt LEFT JOIN Result_Meeting "
Sql = Sql & "ON DailyRpt.Result_Meeting_ID = Result_Meeting.Result_Meeting_ID "
Sql = Sql & " Where ((DailyRpt.DailyRpt_Date between '" & Date1 & "' and '" & Date2 & "')"
If cboEmployee <> "·Ñé§ËÁ´" Then
Sql = Sql & " and DailyRpt.Employee_ID = '" & tmpEmployee & "' )"
End If
พอเกด debug ดูนะคะ มันออกมาเป็นแบบนี้คะ
"SELECT DailyRpt.*, Result_Meeting.Result_Meeting_Name FROM DailyRpt LEFT JOIN Result_Meeting ON DailyRpt.Result_Meeting_ID = Result_Meeting.Result_Meeting_ID Where ((DailyRpt.DailyRpt_Date between '01-May-08' and '28-May-08') and DailyRpt.Employee_Im"
มันออกมาไม่ครบคะ ตรง
and DailyRpt.Employee_IM ความจริงมันต้องควรเป็น DailyRpt.Employee_ID = 'S0001'
ไม่ทราบว่าควรต้องแก้ไขอย่างไรบ้างคะ ขอบคุณล่วงหน้าคะ