Append Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have tables "A" and "B". In both tables, I have a field called "Duplicate
Key". I want to append only the records from Table A to Table B when
"Duplicate Key" in Table A does not exist in Table B.

So what I did was I put this criteria "<>[Table B]![Duplicate Key]" under
the Duplicate Key of Table A in my append query. When I do that, it would
not append anything. In my append query, I also draw arrows from Table A to
Table B on the similar fields.

Please help. Thanks.
 
AccessHelp said:
I have tables "A" and "B". In both tables, I have a field called "Duplicate
Key". I want to append only the records from Table A to Table B when
"Duplicate Key" in Table A does not exist in Table B.

So what I did was I put this criteria "<>[Table B]![Duplicate Key]" under
the Duplicate Key of Table A in my append query. When I do that, it would
not append anything. In my append query, I also draw arrows from Table A to
Table B on the similar fields.


Posting your query would probably help us understand what
you are trying to do.

If you are using an outer join to check fo the unmatched
records, the criteria should be IS NULL.
 
Thanks Marshall. I have that problem solved.

However, I do have another problem. I hope you can help me.

I have a macro containing a group of append, delete and update queries from
Table A to Table B. I use that macro on a command button on a form, so when
people click on it, the macro will append, delete and update from Table A to
Table B. The problem is when I click on the button, I got an Action Failed
error message. On the Action Failed window, it shows that macro name and the
append query name that I needed help with in the beginning.

When I click on Halt on the Action Failed window, I got this error message,
"The table "B" is already opened exclusively by another user, or it is
already open through the user interface and cannot be manipulated
programmatically."

What strange is when I click on those queries individually and the macro
itself, they run properly. I only get the error when I click on the button.
I created the button by following the Access menu.

Thanks. Please help.

Marshall Barton said:
AccessHelp said:
I have tables "A" and "B". In both tables, I have a field called "Duplicate
Key". I want to append only the records from Table A to Table B when
"Duplicate Key" in Table A does not exist in Table B.

So what I did was I put this criteria "<>[Table B]![Duplicate Key]" under
the Duplicate Key of Table A in my append query. When I do that, it would
not append anything. In my append query, I also draw arrows from Table A to
Table B on the similar fields.


Posting your query would probably help us understand what
you are trying to do.

If you are using an outer join to check fo the unmatched
records, the criteria should be IS NULL.
 
AccessHelp said:
Thanks Marshall. I have that problem solved.

However, I do have another problem. I hope you can help me.

I have a macro containing a group of append, delete and update queries from
Table A to Table B. I use that macro on a command button on a form, so when
people click on it, the macro will append, delete and update from Table A to
Table B. The problem is when I click on the button, I got an Action Failed
error message. On the Action Failed window, it shows that macro name and the
append query name that I needed help with in the beginning.

When I click on Halt on the Action Failed window, I got this error message,
"The table "B" is already opened exclusively by another user, or it is
already open through the user interface and cannot be manipulated
programmatically."

What strange is when I click on those queries individually and the macro
itself, they run properly. I only get the error when I click on the button.
I created the button by following the Access menu.


Lacking more details, I would guess that the form with the
button (or some other form) is open and bound to table B.
 
Back
Top