I want to combine the two functions below into one. I want to press one button on the switchboard and If macMissing returns more than zero rows, I want to run macMissing and show the query result. If it has zero rows I want it to run macCombine.
How do I modify these converted macros to do that.
thanks
How do I modify these converted macros to do that.
thanks
Code:
Function macCombine()
On Error GoTo macCombine_Err
DoCmd.SetWarnings False
DoCmd.OpenQuery "ZqryCombinedToOverwriteWeeklyActuals", acViewNormal, acReadOnly
DoCmd.OpenQuery "qryDeleteWeeklyActuals", acViewNormal, acEdit
DoCmd.OpenQuery "ZqryAppendNewWeeklyActuals", acViewNormal, acEdit
DoCmd.SetWarnings True
End Function
Code:
Function macMissing()
On Error GoTo macMissing_Err
DoCmd.OpenQuery "qryMissing in188", acViewNormal, acReadOnly
End Function