Discussion Locked

Unusual Error

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a property table and a details table. The PK for the property table is an autonumber. When I save a new record, I create the property table record first, then I save the detail record using a different recordset, assigning the PK in the details table recordset (SaveRSDetails) by referencing the PK in the first recordset (SaveRS). I can assign the PK value without problems. When I try to assign any other values to the new record in SaveRSDetails, I get the following message:
------------------------------------------------------------------------------------
Run-time error ?-2147217887 (80040e21)?:

Multiple-step operation generated errors. Check each status value.
-------------------------------------------------------------------------------------

The values are passed to my class module through properties and stored in the vntCompRecord array. Here is the code (with extraneous code removed for the sake of simplicity):

Public Function Save() As Boolean

Dim i As Integer
Dim j As Integer
Dim SaveRS As ADODB.Recordset
Dim SaveRSDetails As ADODB.Recordset

strSQL = "Actual Statement Omitted?
strSQLDetails = " Actual Statement Omitted "

Set SaveRS = New ADODB.Recordset
Set SaveRS = GetRecordSet(strSQL, True)
SaveRS.AddNew

For i = 1 To 13
SaveRS(i) = vntCompRecord(i)
Next i

SaveRS.Update

Set SaveRSDetails = New ADODB.Recordset
Set SaveRSDetails = GetRecordSet(strSQLDetails, True)
SaveRSDetails.AddNew
SaveRSDetails(0)= SaveRS(0)

j = 1

For i = 14 To 37
SaveRSDetails(j) = vntCompRecord(i)
j = j + 1
Next i

SaveRSDetails.Update
Save = True

End Function

5 replies

by maxwell edison

Greetings,

To resolve this error message, follow these steps:

In the ReviewItemsWorkflow script code (in Access Workflow Designer), locate the State2_OnExit procedure.

Near the end of the code (before the two End If statements), you see the following lines of code:

rsReview.Fields("StatusId").Value = rstat
rsReview.

Update
Modify the code (add an If and End If around the lines of code in Item 2 above) so that the code looks as follows:

If not isempty(rstat) then
rsReview.Fields("StatusId").Value = rstat
rsReview.Update
end if
Click Save.

Stop and restart Microsoft SQL Server.

When any of the reviewers attempts to move the document from "In Process" to "Approved," this error message should no longer occur.

NOTE: You have to click Refresh on the Internet Explorer toolbar to see the updated document status.

--------------------

The preceding resolution came from Microsoft article Q272583 found at this link:

http://support.microsoft.com/support/kb/articles/Q272/5/83.ASP

(REMOVE SPACES from the pasted URL if any snuck in)

Maxwell

by sl-campbell

by afisher

I was assigning a value whose datatype was incompatible with that of the field to which the data was being assigned.

Thanks for the help!

This discussion is closed to new replies.