S
Stormrider
I have an insert function on a form in VBA (see below).
When I try to insert a record the record is displayed on form but the
following error message pops up:
The Microsoft Office Access Database Engine cannot find a record in the
table...
When I ok and quit Access I get the usual you cannot save the record at this
time. If I close and reenter the form the record IS saved and there.
My code is below, any ideas?
Thanks!
Private Sub Greenhouse_AfterUpdate()
Dim mSQLCmd As String
mSQLCmd = "INSERT INTO Production_Run_Greenhouses VALUES ('" & Me.Text10 &
"','" & Me.Greenhouse & "'," & "1" & ")"
CurrentDb.Execute mSQLCmd
End Sub
When I try to insert a record the record is displayed on form but the
following error message pops up:
The Microsoft Office Access Database Engine cannot find a record in the
table...
When I ok and quit Access I get the usual you cannot save the record at this
time. If I close and reenter the form the record IS saved and there.
My code is below, any ideas?
Thanks!
Private Sub Greenhouse_AfterUpdate()
Dim mSQLCmd As String
mSQLCmd = "INSERT INTO Production_Run_Greenhouses VALUES ('" & Me.Text10 &
"','" & Me.Greenhouse & "'," & "1" & ")"
CurrentDb.Execute mSQLCmd
End Sub