Hi all!
I'm having a problem with an update query run from vba. it sometimes does what it's supposed to do and sometimes it doesn't...
It just changes an ID to another
strSql = "UPDATE tblInvEquipos SET EquipoIdFk=" & dblAsignarId & " WHERE InvEquiposIdPk=" & dblInvEquipoId & ""
DoCmd.SetWarnings False
DoCmd.RunSQL strSql
DoCmd.SetWarnings True
dblNewId = DLookup("EquipoIdFk", "tblInvEquipos", "InvEquiposIdPk= " & dblInvEquipoId & "")
strEquipoNuevo = DLookup("Equipo", "tblEquipos", "EquipoIdPk=" & dblNewId & "")
I even put the last lines to check that it did it but the message displays the right info but sometimes it doesn't changes anything!
any thoughts?
Thank you!
I'm having a problem with an update query run from vba. it sometimes does what it's supposed to do and sometimes it doesn't...
It just changes an ID to another
strSql = "UPDATE tblInvEquipos SET EquipoIdFk=" & dblAsignarId & " WHERE InvEquiposIdPk=" & dblInvEquipoId & ""
DoCmd.SetWarnings False
DoCmd.RunSQL strSql
DoCmd.SetWarnings True
dblNewId = DLookup("EquipoIdFk", "tblInvEquipos", "InvEquiposIdPk= " & dblInvEquipoId & "")
strEquipoNuevo = DLookup("Equipo", "tblEquipos", "EquipoIdPk=" & dblNewId & "")
I even put the last lines to check that it did it but the message displays the right info but sometimes it doesn't changes anything!
any thoughts?
Thank you!