K
Krisse
I need to run a query that may or may not return any
rows. If it does return rows, I want to undo the row that
is being entered edited. As a start, I did the following,
but it dies on the DoCmd. The query name is definitely
valid. I tried to put that query in a macro and
DoCmd.RunMacro (MacroAction) but that failed, too.
Private Sub BeginTime_AfterUpdate()
DoCmd.OpenQuery (qryFindConflicts)
'Here I need code to check the record count of the query
and if > 0 then I will execute the undo command below.
Help with how to write that if statement would be
appreciated!
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
acMenuVer70
End Sub
Thanks!
rows. If it does return rows, I want to undo the row that
is being entered edited. As a start, I did the following,
but it dies on the DoCmd. The query name is definitely
valid. I tried to put that query in a macro and
DoCmd.RunMacro (MacroAction) but that failed, too.
Private Sub BeginTime_AfterUpdate()
DoCmd.OpenQuery (qryFindConflicts)
'Here I need code to check the record count of the query
and if > 0 then I will execute the undo command below.
Help with how to write that if statement would be
appreciated!
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
acMenuVer70
End Sub
Thanks!