G
Guest
I have a module that uses the TransferSpreadsheet acImport to bring in 4
tables into one table and that works great. The next step I am having
trouble with is on each record I have about 8 different checks for warnings
or errors in the data.
Because several of the checks require nested if's, I would like to open the
table and code the checks for each record but I can not figure out how to do
it. I have tried the following where all of the names used in the code are
the actual data field names:
Private Sub Warn_Errors()
With CurrentDb.OpenRecordset("CPAP_Import", dbOpenDynaset)
Do Until .EOF ' To step through all records
.Edit ' For example
Dim tw_txt, te_txt As String
If IsNull([CPAP_SD]) Then
X_Cnt_Error = 1
X_E_SD = True
X_E_Text = "No Start Date Entered"
Else
'Additional test will go here!
End If
.Update
.MoveNext
Loop
End With
Please help, \DDBeards
tables into one table and that works great. The next step I am having
trouble with is on each record I have about 8 different checks for warnings
or errors in the data.
Because several of the checks require nested if's, I would like to open the
table and code the checks for each record but I can not figure out how to do
it. I have tried the following where all of the names used in the code are
the actual data field names:
Private Sub Warn_Errors()
With CurrentDb.OpenRecordset("CPAP_Import", dbOpenDynaset)
Do Until .EOF ' To step through all records
.Edit ' For example
Dim tw_txt, te_txt As String
If IsNull([CPAP_SD]) Then
X_Cnt_Error = 1
X_E_SD = True
X_E_Text = "No Start Date Entered"
Else
'Additional test will go here!
End If
.Update
.MoveNext
Loop
End With
Please help, \DDBeards