andrewpogi
New member
- Local time
- Today, 23:08
- Joined
- Nov 14, 2017
- Messages
- 4
Hi,
Im new to access, recently I have created a table of payments (Year, Voucher No, Payee, Voucher_Copy, etc.) with column for Voucher_Copy as attachments - in pdf file. I created a table for each year because the database would be huge if I would combine the years. So the table header for each year are the same.
Then, I created another file to have a query for each table table and created a union query, the problem after I created the union query and run it I stumble an error message saying "multi-valued field (attachment field - with pdf attachment) cannot be used in a union query.
below is the copy of the sql statement, appreciate of any help from the experts.
Many thanks in advance..
SELECT PAYMENTS_2013.['YEAR], PAYMENTS_2013.[BANK], PAYMENTS_2013.[DOC NO], PAYMENTS_2013.[VCHR NO], PAYMENTS_2013.['DATE], PAYMENTS_2013.[STATUS], PAYMENTS_2013.[CUR], PAYMENTS_2013.[AMOUNT], PAYMENTS_2013.[PAYEE], PAYMENTS_2013.[DESCRIPTION], PAYMENTS_2013.[VOUCHER_COPY], PAYMENTS_2013.[VOUCHER_COPY].[FileData], [VOUCHER_COPY].[FileFlags] AS Expr1, PAYMENTS_2013.[VOUCHER_COPY].[FileName], [VOUCHER_COPY].[FileTimeStamp] AS Expr2, PAYMENTS_2013.[VOUCHER_COPY].[FileType], [VOUCHER_COPY].[FileURL] AS Expr3, PAYMENTS_2013.[PRE_EXP], PAYMENTS_2013.[FA], PAYMENTS_2013.[FA_NO]
FROM PAYMENTS_2013
UNION ALL
SELECT PAYMENTS_2014.['YEAR], PAYMENTS_2014.[BANK], PAYMENTS_2014.[DOC NO], PAYMENTS_2014.[VCHR NO], PAYMENTS_2014.['DATE], PAYMENTS_2014.[STATUS], PAYMENTS_2014.[CUR], PAYMENTS_2014.[AMOUNT], PAYMENTS_2014.[PAYEE], PAYMENTS_2014.[DESCRIPTION], PAYMENTS_2014.[VOUCHER_COPY], PAYMENTS_2014.[VOUCHER_COPY].[FileData], [VOUCHER_COPY].[FileFlags] AS Expr1, PAYMENTS_2014.[VOUCHER_COPY].[FileName], [VOUCHER_COPY].[FileTimeStamp] AS Expr2, PAYMENTS_2014.[VOUCHER_COPY].[FileType], [VOUCHER_COPY].[FileURL] AS Expr3, PAYMENTS_2014.[PRE_EXP], PAYMENTS_2014.[FA], PAYMENTS_2014.[FA_NO]
FROM PAYMENTS_2014;
Im new to access, recently I have created a table of payments (Year, Voucher No, Payee, Voucher_Copy, etc.) with column for Voucher_Copy as attachments - in pdf file. I created a table for each year because the database would be huge if I would combine the years. So the table header for each year are the same.
Then, I created another file to have a query for each table table and created a union query, the problem after I created the union query and run it I stumble an error message saying "multi-valued field (attachment field - with pdf attachment) cannot be used in a union query.
below is the copy of the sql statement, appreciate of any help from the experts.
Many thanks in advance..
SELECT PAYMENTS_2013.['YEAR], PAYMENTS_2013.[BANK], PAYMENTS_2013.[DOC NO], PAYMENTS_2013.[VCHR NO], PAYMENTS_2013.['DATE], PAYMENTS_2013.[STATUS], PAYMENTS_2013.[CUR], PAYMENTS_2013.[AMOUNT], PAYMENTS_2013.[PAYEE], PAYMENTS_2013.[DESCRIPTION], PAYMENTS_2013.[VOUCHER_COPY], PAYMENTS_2013.[VOUCHER_COPY].[FileData], [VOUCHER_COPY].[FileFlags] AS Expr1, PAYMENTS_2013.[VOUCHER_COPY].[FileName], [VOUCHER_COPY].[FileTimeStamp] AS Expr2, PAYMENTS_2013.[VOUCHER_COPY].[FileType], [VOUCHER_COPY].[FileURL] AS Expr3, PAYMENTS_2013.[PRE_EXP], PAYMENTS_2013.[FA], PAYMENTS_2013.[FA_NO]
FROM PAYMENTS_2013
UNION ALL
SELECT PAYMENTS_2014.['YEAR], PAYMENTS_2014.[BANK], PAYMENTS_2014.[DOC NO], PAYMENTS_2014.[VCHR NO], PAYMENTS_2014.['DATE], PAYMENTS_2014.[STATUS], PAYMENTS_2014.[CUR], PAYMENTS_2014.[AMOUNT], PAYMENTS_2014.[PAYEE], PAYMENTS_2014.[DESCRIPTION], PAYMENTS_2014.[VOUCHER_COPY], PAYMENTS_2014.[VOUCHER_COPY].[FileData], [VOUCHER_COPY].[FileFlags] AS Expr1, PAYMENTS_2014.[VOUCHER_COPY].[FileName], [VOUCHER_COPY].[FileTimeStamp] AS Expr2, PAYMENTS_2014.[VOUCHER_COPY].[FileType], [VOUCHER_COPY].[FileURL] AS Expr3, PAYMENTS_2014.[PRE_EXP], PAYMENTS_2014.[FA], PAYMENTS_2014.[FA_NO]
FROM PAYMENTS_2014;