N
niuginikiwi
I am trying to update a date field on table tblApplications using the
code on command button btnGo as shown below. I think the procedure
runs the query as expected but then JET engine says " you are about
to update 0 rows, Yes to accept or No to cancel"....
But I know that I have a record present that I am trying to update.
Can anyone help me on this please?
Private Sub btnGo_Click()
Const conDateFormat = "\#mm\/dd\/yyyy\#"
Dim SQL As String
'Stop
'update sql string
SQL = "UPDATE tblApplications " & _
"SET tblApplications.ApplicationDate = " & Format(Me!
txtNewApplicationDate, conDateFormat) & _
"WHERE tblApplications.ApplicationDate = " & Format(Me!
txtApplicationDate, conDateFormat) & " AND tblApplications.OperationID
= " & Me!cboOperation.Column(0) & " AND
tblApplications.PlantingDetailsID = PlantingDetailsID" &
MultiSelectSQL(Me!lstPlantings)
'run the update query
DoCmd.RunSQL SQL
End Sub
code on command button btnGo as shown below. I think the procedure
runs the query as expected but then JET engine says " you are about
to update 0 rows, Yes to accept or No to cancel"....
But I know that I have a record present that I am trying to update.
Can anyone help me on this please?
Private Sub btnGo_Click()
Const conDateFormat = "\#mm\/dd\/yyyy\#"
Dim SQL As String
'Stop
'update sql string
SQL = "UPDATE tblApplications " & _
"SET tblApplications.ApplicationDate = " & Format(Me!
txtNewApplicationDate, conDateFormat) & _
"WHERE tblApplications.ApplicationDate = " & Format(Me!
txtApplicationDate, conDateFormat) & " AND tblApplications.OperationID
= " & Me!cboOperation.Column(0) & " AND
tblApplications.PlantingDetailsID = PlantingDetailsID" &
MultiSelectSQL(Me!lstPlantings)
'run the update query
DoCmd.RunSQL SQL
End Sub