Home > Software engineering > VB 3265 errors in the corresponding item cannot be found in the collection of the name or ordinal
VB 3265 errors in the corresponding item cannot be found in the collection of the name or ordinal
Time:09-20
Error statements in line 7, but with these fields in the database, don't know how to change? O master answer 1 sql_gh_month="select * from T_gonghaocunchu_month where date='" & amp; M_now & amp; "' "2 Set mrc_month_gh=the ExecuteSQL (sql_gh_month) 3 str1="" 4 For j=0 To p_count_formula - 1 5 str1=str1 & amp; "The update T_gonghaocunchu_month set "6 mrc_month_gh. Fields (" number "). The value=https://bbs.csdn.net/topics/mrc_month_gh.Fields (" number "). The value + formula_table (j). The value
7 str1=str1 & amp; "The number=" & amp; Mrc_month_gh. Fields (" number "). The value
11 Set mrc_month_gh=the ExecuteSQL (str1) The Set of 12 mrc_month_gh=Nothing
CodePudding user response:
Add a breakpoint, see if there are records, mrc_month_gh if it is no problem in front of the cycle, cycle at some point error, and add a breakpoint to see if the data is normal, and add a judgment, whether the data at the end of the eof
CodePudding user response:
Mrc_month_gh records, and all the time at the beginning of each month will add records, and then update values, the error is in the loop to a moment when, sometimes the cycle error sometimes is not an error, it is difficult to capture, abnormal data is not very understanding you said is what circumstance?