Function UpdateCumuMissing() 'On Error GoTo Error123 Dim db As DAO.Database Dim rs, Rst As DAO.Recordset Dim Matchkey As String Dim i, j, k As Integer Dim Monthkey As String Dim txtyyyyMM As String 'i = 0 Set db = CurrentDb Set rs = db.OpenRecordset("Qry_UP_MissingIxosCertReview", dbOpenDynaset) rs.MoveFirst Matchkey = rs!sys_cust_St txtyyyyMM = Format(rs!yyyymm, "@@@@_@@") 'Monthkey = ReviewCertKey(txtyyyyMM, Matchkey) While Not rs.EOF 'i = i + 1 'Select Case i 'Case Is = 10000, 50000, 100000, 200000, 300000, 500000 'MsgBox i / rs.RecordCount & " " & i 'End Select Set Rst = db.OpenRecordset("SELECT [" & txtyyyyMM & "] As Expr1 FROM tbl_Customer_Certs WHERE (Sys_cust_st ='" & Matchkey & "')") Monthkey = Rst!Expr1 'SELECT [" & Txtyyymm & "]* FROM tbl_Customer_Certs WHERE (Sys_cust_st ='" & matchkey & "')") 'rs.Update rs.Edit rs!IxosCertDateMatch = Monthkey 'rs!AnotherField = SomeOtherValue rs.Update rs.MoveNext Set Rst = Nothing Wend Set rs = Nothing Set db = Nothing MsgBox "Complete" MsgBox "Complete" ErrorExit: Exit Function Error123: Set Rst = Nothing Set rs = Nothing Set db = Nothing MsgBox Err.Description & vbNewLine & Err.Number & vbNewLine & Err.Source Resume ErrorExit End Function
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE