On 2 jan, 00:29, mickie <mickie200...@yahoo.co.uk> wrote:
> I have a stored Append Query that I want to call as part of an 'If
> Statement'. The If Statement is assigned to an "AfterUpdate" property
> on a form.
>
> The query is called 'qryAppendCCLogTable' and it does work when ran in
> application. The SQL is;
>
> INSERT INTO [CC Log] ( [Prop Reference], [Summary of Change] )
> SELECT [Proposed Change].[Prop Reference], [Proposed Change].[Summary
> of Change]
> FROM [Proposed Change]
> WHERE ((([Proposed Change].[Accepted As RFC])="yes"));
>
> This is the code I have so far
>
> - - - - - - -
> Private Sub Accepted_As_RFC_AfterUpdate()
>
> * * If Accepted_As_RFC.Value = "Yes" Then
>
> * * MsgBox ("You are about to add this record to the Change Control
> Log")
>
> * * End
>
> * * 'This is where I want to run the query
>
> * * Else
> * * 'do nothing
>
> * * End
>
> * * End If
>
> End Sub
> - - - - - - - -
> I have tried numerous versions of code from various sources and after
> two weeks am starting to want to give up!
>
> Can anyone help pleeeease????
Did you try: DoCmd.OpenQuery 'qryAppendCCLogTable' ?
Groeten,
Peter
http://access.xps350.com