First of all, here's the error message I'm receiveing: Microsoft DataGrid
Control - Errors occurred.

Basically, I'm updating data in a data grid, when I redisplay the data grid
the error is occurring. The data seen in the grid is being updated via another
VB form. I enter the conditions for the update, so I may say that I want
to set field X = Y where last name = Steelers. That works fine.

But if I happen to copy the "Steelers" from the original data grid (where
the errors are occurring) and paste it into the update form, I get this weird
error when I refresh the data grid. Whatever data I copied gets temporarily
placed in the first field of the grid, I get the error message and click
OK, and then the field returns to normal and it seems as though an error
never occurred. This also seemed to happen a couple of times when I did
not copy and paste at all, however it usually works fine.

I thought it may be reading the clipboard somehow, but I tried clearing it
numerous times in the code and it did nothing. Anyaways, any help would
be greatly appreciated. The code that is doing all of the work is seen below.


'Connection string
frmReview.Adodc8.ConnectionString = "driver={Microsoft ODBC for ORACLE};
SERVER=" & user1.userHSDInstance_str & "; uid=" & user1.userHSDnm_str & ";
pwd=" & user1.userHSDps_str
frmReview.Adodc8.LockType = adLockPessimistic
frmReview.Adodc8.CursorType = adOpenStatic
frmReview.Adodc8.CursorLocation = adUseClient


'retrieves records that fit entered criteria
ElseIf frmMassUpdate.chkAnd.Value = 1 And Criteria1 <> "hp_effective_date"
_
And Criteria1 <> "dia_effective_date" _
And Criteria1 <> "hp_term_date" _
And Criteria1 <> "dia_term_date" _
And (Criteria2 = "hp_effective_date" _
Or Criteria2 = "dia_effective_date" _
Or Criteria2 = "hp_term_date" _
Or Criteria2 = "dia_term_date") Then

frmReview.Adodc8.RecordSource = "select edi_flag, result_flag, dia_subscriber_id,
hp_subscriber_id," + _
" dia_last_name, hp_last_name, dia_first_name, hp_first_name, dia_ipa_id,
hp_ipa_id," + _
" dia_group_id, hp_group_id, dia_plan_code, hp_plan_code, dia_provider_1_id,
hp_provider_1_id," + _
" dia_effective_date, hp_effective_date, dia_term_date, hp_term_date
from caprec_working where " + _
Criteria1 + " " + Operator1 + " '" + frmMassUpdate.txtCriteria1.Text
+ "' and " + _
Criteria2 + " " + Operator2 + " to_date('" + frmMassUpdate.txtCriteria2.Text
+ "', 'mm/dd/yyyy') and hp_group_id = '" + user1.userrun_grpid + _
"' and cycle_no = '" + Trim(Str(frmMainUser.int_cycno)) + "' order
by edi_flag, result_flag, hp_subscriber_id"
frmReview.Adodc8.Refresh


'performs the update
ElseIf frmMassUpdate.chkAnd.Value = 1 And Criteria1 <> "hp_effective_date"
_
And Criteria1 <> "dia_effective_date" _
And Criteria1 <> "hp_term_date" _
And Criteria1 <> "dia_term_date" _
And (Criteria2 = "hp_effective_date" _
Or Criteria2 = "dia_effective_date" _
Or Criteria2 = "hp_term_date" _
Or Criteria2 = "dia_term_date") Then

SqlString = "update caprec_working set " + UpdateFld + " = '" + _
UpdateValue + "' where " + Criteria1 + " " + Operator + " '" + frmMassUpdate.txtCriteria1.Text
+ "' and " + _
Criteria2 + " " + Operator2 + " to_date('" + frmMassUpdate.txtCriteria2.Text
+ "', 'mm/dd/yyyy') and hp_group_id = '" + user1.userrun_grpid + "' and cycle_no
= '" + Trim(Str(frmMainUser.int_cycno)) + "'"

Set cmd = New ADODB.Command
Set cmd.ActiveConnection = CapReconMod.mconn
cmd.CommandText = SqlString
cmd.Execute


'hides the current forms, shows the form that holds the data grid
'where the error is occurring, and refreshes the
'recordsource and datagrid

Me.Hide
CapReconMod.display_status ("Updating records. . . please wait")
Unload frmMassUpdate
frmMainUser.Adodc1.Refresh 'bound to datagrid2 (where errors are
occurring)
DoEvents
frmMainUser.DataGrid2.Refresh 'where error is occurring
DoEvents
dlgStatus.Hide
Screen.MousePointer = vbDefault
frmMainUser.Show
frmMainUser.DataGrid2.Columns(22).Visible = False
Unload Me