R
Robert Painter
Hi
i have a table tblemployeeskills with employeeskillid, skillidfk,
employeeidfk.
there are many instances of employeeidfk duplicated. what i would like to
do is find
the unique number of employees with the following code and send it to a
message box, but keep getting error end of statement or syntax problem.. can
anyone see anything wrong it highlights the line mysql = mysql " FROM
tblEmployeeSkills";
Private Sub cmdSearch_Click()
On Error GoTo errhandler:
Dim rs As DAO.Recordset
'/ Create your recordset..
mysql = "SELECT DISTINCT Count(tblEmployeeSkills.EmployeeIDFK) AS
CountOfEmployeeIDFK"
mysql = mysql " FROM tblEmployeeSkills";
Set rs = CurrentDb.OpenRecordset(mysql)
'/ Populate your message boxl..
MsgBox rs!CountOfEmployeeIDFK
'/ Close shop..
rs.close
set rs = nothing
errhandler:
MsgBox "error halted you dimwit"
End Sub
Many thanks for reading and help very much appreciated
Robert
i have a table tblemployeeskills with employeeskillid, skillidfk,
employeeidfk.
there are many instances of employeeidfk duplicated. what i would like to
do is find
the unique number of employees with the following code and send it to a
message box, but keep getting error end of statement or syntax problem.. can
anyone see anything wrong it highlights the line mysql = mysql " FROM
tblEmployeeSkills";
Private Sub cmdSearch_Click()
On Error GoTo errhandler:
Dim rs As DAO.Recordset
'/ Create your recordset..
mysql = "SELECT DISTINCT Count(tblEmployeeSkills.EmployeeIDFK) AS
CountOfEmployeeIDFK"
mysql = mysql " FROM tblEmployeeSkills";
Set rs = CurrentDb.OpenRecordset(mysql)
'/ Populate your message boxl..
MsgBox rs!CountOfEmployeeIDFK
'/ Close shop..
rs.close
set rs = nothing
errhandler:
MsgBox "error halted you dimwit"
End Sub
Many thanks for reading and help very much appreciated
Robert