Hello all,
I need your kind assistance in helping me figure out what is wrong with my code in vba. Let me explain you, I have working with "ADODB.Connection"
my connection is.
With Cnn
.Provider = "Microsoft.ACE.OLEDB.12.0"
.ConnectionString = "Data Source=" & ThisWorkbook.FullName & ";Extended Properties=""Excel 12.0;HDR=Yes;""": C_Error = True
.Open
End With
it seems like does not work when I call this
Call Conexion.Abrir_Rs
SQL = " SELECT M.ID As IdM, M.NOMBRES, M.CODIGO As Codigo, P.NOMBRE As NomD, M.FOTO As Foto, M.ESTADO " & _
" FROM [TB_EMPLEADOS$] M, [TB_DEPARTAMENTOS$] P" & _
" WHERE M.ID_D=P.ID ORDER BY M.ID"
Rs.Open SQL, Cnn, 1, 1
It crashed with the message "no value given for one or more required parameters", what I know until now is the Column name(s) is/are wrong (could be CODIGO or/and other), How can I change that Column name or just is another problem?
Bookmarks