N
Noel
Hi. Some time ago I created a command button On Click
event code as follows to run two Queries, one after the
other. I retested this recently and I now find that the
first query runs but the second does not. I must have
changed something and forgot to retest it at the time.
Whats gone wrong? Thanks, Noel
The first query is called Append School Offers to Archive
The second is called Clear Fields - School Offers
Private Sub AppendSchoolOffers_Click()
On Error GoTo Err_AppendSchoolOffers_Click
DoCmd.SetWarnings False
Dim stDocName As String
stDocName = "Append School Offers to Archive"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.OpenQuery "Clear Fields - School Offers"
DoCmd.Close
Exit_AppendSchoolOffers_Click:
Exit Sub
Err_AppendSchoolOffers_Click:
MsgBox Err.Description
Resume Exit_AppendSchoolOffers_Click
DoCmd.SetWarnings True
End Sub
event code as follows to run two Queries, one after the
other. I retested this recently and I now find that the
first query runs but the second does not. I must have
changed something and forgot to retest it at the time.
Whats gone wrong? Thanks, Noel
The first query is called Append School Offers to Archive
The second is called Clear Fields - School Offers
Private Sub AppendSchoolOffers_Click()
On Error GoTo Err_AppendSchoolOffers_Click
DoCmd.SetWarnings False
Dim stDocName As String
stDocName = "Append School Offers to Archive"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.OpenQuery "Clear Fields - School Offers"
DoCmd.Close
Exit_AppendSchoolOffers_Click:
Exit Sub
Err_AppendSchoolOffers_Click:
MsgBox Err.Description
Resume Exit_AppendSchoolOffers_Click
DoCmd.SetWarnings True
End Sub