EDIT: Here are two database Files that demonstrate an applied example of the problem:
Example_DBs.zip (Zipped due to 2 link limitation.)
Note: The missing Field in "Not Working.mdb" is intentional. Please have a look at the attached diagram for further clarification.
I'm trying to create a single, Update Query in Access 2007 that does all of these 3 things:
Update(skipping zero-length values) Append
- Automatically handle missing Fields without showing any "Enter Parameter Value" prompts.
I've managed to accomplish the 1st & 2nd items on my own, but I'm stumped on the 3rd. In essence, what I'm looking for is a way of telling Access to automatically use a zero-length/null value for any missing Field(s) the Query encounters, so long as it does not involve manually modifying the Table beforehand. Automation is key. And that's where you guys come in.
Here is a diagram of the desired results from a set of sample Tables:
And here is the Update Query's SQL code adjusted for those sample Tables:
UPDATE Table_1 RIGHT JOIN Table_2 ON Table_1.ID = Table_2.ID SET Table_1.ID = NZ([Table_2].[ID],[Table_1].[ID]), Table_1.Company = NZ([Table_2].[Company],[Table_1].[Company]), Table_1.Address = NZ([Table_2].[Address],[Table_1].[Address]), Table_1.Phone = NZ([Table_2].[Phone],[Table_1].[Phone]);
Any help would be greatly appreciated.