Updating records in a table with records from another table. (1 Viewer)

MilaK

Registered User.
Local time
Today, 06:01
Joined
Feb 9, 2015
Messages
285
Hello,

There are two tables (tbl_Variants) and (tbl_Variant_qry) with identical fields (I verified that they are spelled correctly).
“tbl_Variant_qry” is created from make a table query and will be constantly updated (deleted and recreated)

I’ve created a query that should update records from tbl_Variant_qry to tbl_Variants if [aa_change] and [sample_id] are matching. I’m not sure if it’s important but most of the fields are blank in both tables.
When I run the query I get prompted to enter parameter value. Is this happening because most records in tbl_Variant_qry are blank and it’s asking me for input?

Code:
UPDATE tbl_Variants SET tbl_Variants.Review_One = [tbl_Variant_qry].[Review_One]
WHERE (((tbl_Variants.aa_change)=[tbl_Variant_qry].[aa_change]) AND ((tbl_Variants.sample_id)=[tbl_Variant_qry].[sample_id]));

Thank, Mila
 

MarkK

bit cruncher
Local time
Today, 06:01
Joined
Mar 17, 2004
Messages
8,178
There are two tables (tbl_Variants) and (tbl_Variant_qry) with identical fields (I verified that they are spelled correctly).
“tbl_Variant_qry” is created from make a table query and will be constantly updated (deleted and recreated)
This seems very unusual. Creating data from other data, and then destroying it over time sounds like a design flaw. I know it's not what you are posting about, but if it's a design flaw it might be worth backing up and solving the more fundamental problem first.
 

Users who are viewing this thread

Top Bottom