Share via

Append current record only

Anonymous
2013-12-11T07:21:37+00:00

Hi I want to append the current record only, if it meets a set criteria but I dont want to delete from the query either, so what is happening is when the set criteria occurs all those records with the same criteria are being appended as well. Is it possible to do something on the lines of Me! But I using a macro to do this event?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

13 answers

Sort by: Most helpful
  1. Anonymous
    2013-12-11T12:49:09+00:00

    Hi Scott,

    I have tried this SQL and it append all records :

    INSERT INTO tblIRTrackConcessions ( CalculationID )

    SELECT [Enter Talyform Data Query].CalculationID

    FROM [Enter Talyform Data Query], tblParameters

    WHERE [Forms]![Enter Data]![CalculationID];

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2013-12-11T12:23:25+00:00

    I'm assuming you are triggering this Append from a form. If not, you should be. So the first criteria you should use is the PK of the record:

    INSERT INTO table (field list)

    SELECT field list

    FROM table

    WHERE PK field = Forms!formname!PKcontrol;

    If you need to add other criteria to determine whether or not to append the record, you can either add that to your WHERE clause or check the value of the controls on the form to determine whether to run that Append query.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-12-11T11:35:21+00:00

    You need to change your append.

    You need "only" the ID as criteria.

    If you want to use some/more critiera to search for a record then fine but the append only needs the ID as criteria (assuming the ID is an autonumber or something else that only that record has).  Of course if you want to use more than the ID - for example you want to append all poeple with a certain first name - that's OK.  But I think you're looking for a single record to be added to a table.

    Can you post a copy of your SQL and we will be able to see what is going more clearly

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-12-11T08:29:16+00:00

    Hi Wayne thanks for your reply, the ID is included but all records with the matching criteria are being appended still?

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2013-12-11T07:32:26+00:00

    Set the criteria for the append to include the ID of the record

    Was this answer helpful?

    0 comments No comments