Update/Append Query Question

Huey462

Board Regular
Joined
Jul 25, 2011
Messages
147
How would you use a query to update a specific record in a table?</SPAN>

For example, a query (called “qryUpdate01”) runs with some built in filters and displays all of the remaining records as a datasheet.</SPAN>

Example:</SPAN>

qryUpdate01</SPAN>
ApptComment</SPAN>
tblSchedSSN</SPAN>
Chop down cherry tree</SPAN>
000-00-0001</SPAN>
Muffle Parrot</SPAN>
000-00-0008</SPAN>

<TBODY>
</TBODY>

I want to take these results and insert the “ApptComment” field into another table in the “Appt01” Field where the following fields match SSN (destination table) and tblSchedSSN (query)</SPAN>

tblTempCalendar</SPAN>
Name</SPAN>
SSN</SPAN>
Appt01</SPAN>
Appt02</SPAN>
Appt03</SPAN>
…Appt31</SPAN>
Washington, George</SPAN>
000-00-0001</SPAN>
Chop down cherry tree</SPAN>



Adams, John</SPAN>
000-00-0002</SPAN>




Jackson, Andrew</SPAN>
000-00-0008</SPAN>
Muffle Parrot</SPAN>




<TBODY>
</TBODY>
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
If you are using a 1 to many relation, you'd already have tblEmps and tblAppts. 1 Emp has many Appts.
the 2 tables would link on SSN.
tblAppts would have fields:
[ssn]
[ApptComment]
[ApptDate]


There'd be no need tblTempCalendar table, it would be a live crosstab query:
[name], [ssn] as rows, [RowID] as column, and [ApptComment] as value
 
Upvote 0
I've been trying to get this solution to work, but I'm at a loss as to where [RowID] is coming from?
 
Upvote 0

Forum statistics

Threads
1,215,208
Messages
6,123,644
Members
449,111
Latest member
ghennedy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top