G
Guest
I am trying to write a query to append a set of 10 fields to a table when the
Title field in both tables is the same. I was originally trying to use VBA
to do this, but it seemed easier to just use a query.
I think I have it about figured out, however when I try to run it I get a
dialog box asking me for EntireSpreadsheet_local.Title. The idea is not to
use this as a parameter, but to have the query check the values (text
strings) in this field against the same field in another table to see if they
are equal. I would like this operation to be case-insensitive if at all
possible, although I'm not sure how to accomplish this with a SQL statement.
If anyone has any idea why I am getting this error, I would appreciate it.
My code is below:
INSERT INTO EntireSpreadsheet_local ( EntireSpreadsheet_local.ManuscriptRec,
EntireSpreadsheet_local.Method, EntireSpreadsheet_local.Accepted,
EntireSpreadsheet_local.Owner, EntireSpreadsheet_local.[Contract Returned],
EntireSpreadsheet_local.AcqProvisions, EntireSpreadsheet_local.[1st Book
Release date], EntireSpreadsheet_local.[Query Received],
EntireSpreadsheet_local.AcqNotes, EntireSpreadsheet_local.[W-9 requested] )
SELECT QueriesACC.ManuscriptRec, QueriesACC.Method, QueriesACC.Accepted,
QueriesACC.Owner, QueriesACC.[Contract Returned], QueriesACC.AcqProvisions,
QueriesACC.[1st Book Release date], QueriesACC.[Query Received],
QueriesACC.AcqNotes, QueriesACC.[W-9 requested]
FROM QueriesACC
WHERE QueriesACC.Title = EntireSpreadsheet_local.Title OR QueriesACC.Title =
(EntireSpreadsheet_local.Title & ": " & EntireSpreadsheet_local.Subtitle) OR
QueriesACC.Title = (EntireSpreadsheet_local.Title & " : " &
EntireSpreadsheet_local.Subtitle);
Thanks,
Chris
Title field in both tables is the same. I was originally trying to use VBA
to do this, but it seemed easier to just use a query.
I think I have it about figured out, however when I try to run it I get a
dialog box asking me for EntireSpreadsheet_local.Title. The idea is not to
use this as a parameter, but to have the query check the values (text
strings) in this field against the same field in another table to see if they
are equal. I would like this operation to be case-insensitive if at all
possible, although I'm not sure how to accomplish this with a SQL statement.
If anyone has any idea why I am getting this error, I would appreciate it.
My code is below:
INSERT INTO EntireSpreadsheet_local ( EntireSpreadsheet_local.ManuscriptRec,
EntireSpreadsheet_local.Method, EntireSpreadsheet_local.Accepted,
EntireSpreadsheet_local.Owner, EntireSpreadsheet_local.[Contract Returned],
EntireSpreadsheet_local.AcqProvisions, EntireSpreadsheet_local.[1st Book
Release date], EntireSpreadsheet_local.[Query Received],
EntireSpreadsheet_local.AcqNotes, EntireSpreadsheet_local.[W-9 requested] )
SELECT QueriesACC.ManuscriptRec, QueriesACC.Method, QueriesACC.Accepted,
QueriesACC.Owner, QueriesACC.[Contract Returned], QueriesACC.AcqProvisions,
QueriesACC.[1st Book Release date], QueriesACC.[Query Received],
QueriesACC.AcqNotes, QueriesACC.[W-9 requested]
FROM QueriesACC
WHERE QueriesACC.Title = EntireSpreadsheet_local.Title OR QueriesACC.Title =
(EntireSpreadsheet_local.Title & ": " & EntireSpreadsheet_local.Subtitle) OR
QueriesACC.Title = (EntireSpreadsheet_local.Title & " : " &
EntireSpreadsheet_local.Subtitle);
Thanks,
Chris