irunergoiam
Registered User.
- Local time
- Yesterday, 19:06
- Joined
- May 30, 2009
- Messages
- 76
I'm trying to update a table (named [Data File] from a form. Since the record already exists, I need to identify which record is to be updated. I am using a WHERE statement (where Me.cmbCandidate.Column(1) is the Req field in the table, Me.cmbCandidate.Column(2) is the Applicant ID in the table and Me.cmbCandidate.Column(8) is the DateTime stamp in the table. See code below...
Dim strSQL As String
Dim strCriteria As String
strSQL = ""
strSQL = strSQL & " INSERT INTO [Data File]"
strSQL = strSQL & " WHERE((([Data File].Req) = Me.cmbCandidate.Column(1)) And ([Data File].ApplicantID) = Me.cmbCandidate.Column(2)) And ([Data File].DateTime) = Me.cmbCandidate.Column(8)))"
strSQL = strSQL & " ([ValidationComplete], [ValidatedDate], ,[ValidatedTime], [ValidatedBy])"
strSQL = strSQL & " Values"
strSQL = strSQL & " ('" & "Validated" & "',#" & unbEnteredDate & "#,#" & unbEnteredTime & "#,'" & unbEnteredBy & "')"
DoCmd.RunSQL strSQL
Am I on the right track? What am I missing? Thanks to whoever might add to my fledgling Access knowledge.
Dim strSQL As String
Dim strCriteria As String
strSQL = ""
strSQL = strSQL & " INSERT INTO [Data File]"
strSQL = strSQL & " WHERE((([Data File].Req) = Me.cmbCandidate.Column(1)) And ([Data File].ApplicantID) = Me.cmbCandidate.Column(2)) And ([Data File].DateTime) = Me.cmbCandidate.Column(8)))"
strSQL = strSQL & " ([ValidationComplete], [ValidatedDate], ,[ValidatedTime], [ValidatedBy])"
strSQL = strSQL & " Values"
strSQL = strSQL & " ('" & "Validated" & "',#" & unbEnteredDate & "#,#" & unbEnteredTime & "#,'" & unbEnteredBy & "')"
DoCmd.RunSQL strSQL
Am I on the right track? What am I missing? Thanks to whoever might add to my fledgling Access knowledge.