Hi,
I have DoCmd.OutputTo code which is working fine. But the execution stops at that line and ignores the rest of the code. Any suggestions how I can execute the remaining code which is an Update query which should be executed if the .xls file is created.
The code snippet is given below.
Happy Haloween
Raktim.
****************************************************
If flagUp Then
Dim varX As Variant
varX = DLookup("[Status]", "Groups", "[GroupID] =" & GID)
stDocName = "TrackSheet_Rep"
DoCmd.OutputTo acReport, stDocName
MsgBox ("I am HERE")
' Can't SEE the MsgBox and the rest of the code is ignored
If varX = "No" Then
DoCmd.SetWarnings False
DoCmd.RunSQL (sql)
DoCmd.SetWarnings True
End If
Else
MsgBox " Records won't be moved to Spreadsheet"
Exit Sub
End If
I have DoCmd.OutputTo code which is working fine. But the execution stops at that line and ignores the rest of the code. Any suggestions how I can execute the remaining code which is an Update query which should be executed if the .xls file is created.
The code snippet is given below.
Happy Haloween
Raktim.
****************************************************
If flagUp Then
Dim varX As Variant
varX = DLookup("[Status]", "Groups", "[GroupID] =" & GID)
stDocName = "TrackSheet_Rep"
DoCmd.OutputTo acReport, stDocName
MsgBox ("I am HERE")
' Can't SEE the MsgBox and the rest of the code is ignored
If varX = "No" Then
DoCmd.SetWarnings False
DoCmd.RunSQL (sql)
DoCmd.SetWarnings True
End If
Else
MsgBox " Records won't be moved to Spreadsheet"
Exit Sub
End If