The error is your SQL statement.
Quote:
|
staff IT.nostaffuitm,staff IT.namastaffuitm,staff IT.kodjawatan,staff IT.samb
|
Those are illegal. You cannot have spaces.
When you say "INNER JOIN staff IT", That tells the server that STAFF is the tablename, and IT is the nickname you are giving it. Once you declare that, you must use Only the Tablename or the Nickname... not both.
This should fix it:
---------------
Recordset1.Source = "SELECT tb_aduan.id_aduan," _
& " tb_aduan.id_user,tb_aduan.kod_kerosakan," _
& " tb_aduan.sebab_kerosakan, tb_aduan.lokasi," _
& " tb_aduan.blok,tb_aduan.tingkat,tb_aduan.no_bilik," _
& " tb_aduan.tarikhmasa, tb_aduan.arahan," _
& " tb_aduan.bhn_ganti,tb_aduan.laporan,tb_aduan.statu s_id," _
& " tb_aduan.jumlah_kos,tb_aduan.upah," _
& " tb_aduan.kosbhn_ganti,tb_aduan.perundingan, " _
& " IT.nostaffuitm,IT.namastaffuitm,IT.kodjawatan,IT.s amb" _
& " FROM tb_aduan " _
& " INNER JOIN staff IT ON " _
& " tb_aduan.id_user = IT.nostaffuitm " _
& " WHERE id_aduan = " & Replace(Recordset1__MMColParam, "'", "''")"
---------------
I removed "Staff" from the initial select and in the ON clause.
Let me know if it works.
~Le