How about this?
Private Sub Finished_AfterUpdate()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim sSQL As String
Set dbs = Currentdb()
sSQL = "SELECT Count(*) As MyCount FROM qryReadyForRetest " & _
" WHERE Call_ID = " & Me.Call_ID
Set rst = dbs.OpenRecordset(sSQL, dbOpenSnapshot)
If rst!MyCount = 0 Then
' do stuff here
End If
Set rst = Nothing
Set dbs = Nothing
End Sub
--
Danny J. Lesandrini
dlesandrini@hotmail.com http://amazecreations.com
"Koen" <no@spam.nl> wrote in message
news:Xns9448639AF3B5ERubends@194.109.133.20...[color=blue]
> Hi all,
> I have created a nice working database for keeping track of helpdesk[/color]
calls,[color=blue]
> corrective actions etc.
>
> To determine a certain status (for example what calls are ready for test,
> after all actions have been finished) I created queries. Because these
> statusses are depending on more than one parameter, I would like to
> automate the status setting.
>
> So my idea is to put IF...THEN logic underneath AfterUpdate events of all
> fields that can influence a certain status.
>
> For example, one call could have many actions. An action could be critical
> (Y/N) for retest (meaning it should always be finished before the call is
> retested) and an action could be Finished (Y/N). When I change these two
> boolean fields, I would like to trigger some IF...THEN logic that uses my
> query. Something like
>
> Private Sub Finished_AfterUpdate()
> If Me.Call_ID NOT EXIST IN qryReadyForRetest Then
>
> etc.
>
> End Sub
>
> This is not working.
> How do I do this?
> In the end I would like a status field in tblCall be updated after a field
> in tblAction is updated and it meets my criteria.
>
> Hope someone understands and can help.
>
> Thanks,
>
> Koen[/color]