I have created a union query (works ok), and trying to update the query results to a table. I cannot use the 'make table' as I want to update the table at regular intervals.
I think (hope) that I am missing the obvious solution !
A union query is not updateable. When you use the union query in another query, it will render the other query non-updateable. There are possibly ways to get around this with the most common being creating a table to store the union query records.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
If I understand correctly, you would delete all records from the table and then create an append query based on the union query.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
PH,
I'm not sure how helpful a make table query would be since it doesn't get created with a primary key. I had assumed the results would be used in an update query with another table but I could easily be confused ;-)
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
INSERT INTO TheTable(FieldsList) SELECT FieldsList FROM qryMyUnionQuery
FieldsList has to use the same number of fields in both cases. The SELECT FieldList can use Alias names if the source field names are different than the destination field names.
If the fields in both tables are identical, you can just use:
INSERT INTO TheTable SELECT * FROM qryMyUnionQuery
If I understand correctly, you now need to create an additional query that uses tblPlanner_Airdrie to update.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
I think you need to start from the beginning and provide more information.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.