spikepl
Eledittingent Beliped
- Local time
- Today, 10:40
- Joined
- Nov 3, 2010
- Messages
- 6,142
Code:
strSQL = "UPDATE tblEmployeeJobs SET EmpID=@EmpID, JobID=@JobID, JobStart=@JobStart, JobEnd=@JobEnd WHERE EmbJobID=@EmpJobID"
Set qdf = CurrentDb.CreateQueryDef("", strSQL)
With qdf
.Parameters("@EmpID") = Me.txtEmpID
.Parameters("@JobID") = Me.cboJobID
.Parameters("@JobStart") = Me.txtJobStart
.Parameters("@JobEnd") = Me.txtJobEnd
.Parameters("@EmpJobID") = Me.txtEmpJobID
.Execute
End With
I have no clue why the thing wants 6 parameters - any ideas?
The table is
tblEmployeeJobs
-------------------
EmpJobID - autonumber
EmpID - FK
JobID - FK
JobStart - Date
JobEnd - Date
and the data are:
Code:
?Me.txtEMpID, Me.cboJobID, Me.txtJobStart, Me.txtJobEnd, Me.txtEmpJobID
10, 31, 22/09/2015, 05/10/2015, 60