B
B. Meincke
I have a macro that runs a series of actions to update table data from
external csv text files. There is a point at which we need the macro to check
for errors. A make table query dumps any errors into a table.
You folks here were kind enough to introduce me to the DCOUNT condition to
check to see if the recordset of the made table is zero (no errors). The
worked beautifully.
The problem now is that the macro stops at the condition. No matter which
condition I use in the syntax (there are errors, or there are not...) the
macro seems to halt right there and go no further, although there are actions
that follow.
What I really need is more of an "If-Then-Else" kind of condition.
Specifically (although written here in rather informal syntax, of course):
If ... the table's recordset is not null ...
"DCount("*","tblAttendanceRollingErrors")>0" Then
...the macro stops and the table opens so folks can see the errors
Else ... if the table's recordset is null, meaning there are no errors
....
"DCount("*","tblAttendanceRollingErrors")=0"
...the macro continues to execute the remainder of its actions.
I hope this makes sense!
Thanks in advance for any advice or suggestions.
external csv text files. There is a point at which we need the macro to check
for errors. A make table query dumps any errors into a table.
You folks here were kind enough to introduce me to the DCOUNT condition to
check to see if the recordset of the made table is zero (no errors). The
worked beautifully.
The problem now is that the macro stops at the condition. No matter which
condition I use in the syntax (there are errors, or there are not...) the
macro seems to halt right there and go no further, although there are actions
that follow.
What I really need is more of an "If-Then-Else" kind of condition.
Specifically (although written here in rather informal syntax, of course):
If ... the table's recordset is not null ...
"DCount("*","tblAttendanceRollingErrors")>0" Then
...the macro stops and the table opens so folks can see the errors
Else ... if the table's recordset is null, meaning there are no errors
....
"DCount("*","tblAttendanceRollingErrors")=0"
...the macro continues to execute the remainder of its actions.
I hope this makes sense!
Thanks in advance for any advice or suggestions.