Delete/append queries in macro firing late

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Kendra (vernon_at_pbworld.com)
Date: 08/30/04


Date: Mon, 30 Aug 2004 09:06:32 -0700

Hello,

I have a macro created from the combination of two action
queries, a delete query and an append query. The delete
query deletes a record if a certain criteria is met, in my
case [AdminApproval]="decline". Similarly, the append
query appends a record onto another table when a different
criteria is met, [AdminApproval]="accept". To create the
macro, I dragged each of these queries into the first two
lines of my action column (within the macro design view).
In the form, where I am trying to implement the macro, I
have called for the macro in the "afterchange" box of the
properties/events window of the field (the event is
applied to a pull down menu).

I am not sure whether the error is introduced by the query
or the macro. Whenever I open the queries in design view,
their design has changed from what I originally created.
Instead of listing the criteria ([AdminApproval]="accept"
for the append query and [AdminApproval]="deline" for the
delete query) under each column of my query design view
(as shown in the query) the very last column of the append
says "Accept" and "Accept" and "Accept" and the very last
column of the delete query says "Decline" and "Decline"
and "Decline".

I have no idea what is going on, however, the resulting
macro does not behave as it should. When the AdminApproval
field is changed either to "accept" or "decline" for the
first record, nothing happens. When the field is changed
for the second record "accept" or "decline", the change
requested for first record is implemented for the first
record. When the field is changed for the third record,
the change requested for the second record is implemented
for the second record. The changes requested are
eventually implemented (except for the final record), but
this is really bizarre. Any suggestions?

I really appreciate your time,
Kendra



Relevant Pages

  • Re: Run append query from another database
    ... In order to suppress the display of the action query confirmation messages, ... you can put a SetWarnings/No action in the macro, ... but any records that don't exist in the destination ... and "Yes" to append the rows. ...
    (microsoft.public.access.macros)
  • RE: Assign macro on After update event
    ... I don't see why you can't append the current record next scheduled date to ... it then try using an update query to update the dates in the new record. ... "Anna" wrote: ... maybe you can help me with that: all this macro is ...
    (microsoft.public.access.forms)
  • Re: Run append query from another database
    ... In order to suppress the display of the action query confirmation messages, you can put a SetWarnings/No action in the macro, prior to the OpenQuery action. ... Does this meant that there are 1811 records in the source table that are already in the destination table for the append? ... If so, then it may be ok, it just means that the existing records won't be overwritten, but any records that don't exist in the destination will be added. ...
    (microsoft.public.access.macros)
  • Buggy macro -- performing actions after the fact
    ... I have a macro created from the combination of two action ... a delete query and an append query. ... column of the delete query says "Decline" and "Decline" ...
    (microsoft.public.access.macros)
  • Re: Import spreadsheet with pop up
    ... As soon as I run them through the macro it does not seem to work. ... Open Query: Delete Temp ... Open Query: Append Approval ... Open Query: Append Approval2 ...
    (microsoft.public.access.macros)