473,320 Members | 2,189 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

TEMP file UPDATE query VBA

22
I have 2 tables called ReportTracker and Sheet1. The fields are:
ReportTracker
1.Report_Num
2.Facility_Name
3.Unit
Sheet1
1.Repo_Num
2.Resident
3.Physician
4.Comment


Is there a template code for an UPDATE query that shows how to UPDATE multiple fields INTO a table called TEMP from the above tables? The tables have common fields [ReportTracker]report_num = [Sheet1]Repo_num?.
Thanks,
Carl23
Apr 14 '12 #1

✓ answered by limweizhong

If you have Microsoft Access, build the query using the query design view, pulling in the tables, joining them, and changing the query type to *make-table* and dragging in the fields that you want (all the fields except one of the fields you joined on). Then change the view to SQL view, and you can copy the SQL code. You can remove all the extra sets of round brackets that Access tends to insert.

3 1687
If you have Microsoft Access, build the query using the query design view, pulling in the tables, joining them, and changing the query type to *make-table* and dragging in the fields that you want (all the fields except one of the fields you joined on). Then change the view to SQL view, and you can copy the SQL code. You can remove all the extra sets of round brackets that Access tends to insert.
Apr 15 '12 #2
Killer42
8,435 Expert 8TB
Also, you'll find the real Access and SQL experts in our Access/VBA forum, rather than the VB6 area.
Apr 22 '12 #3
Carl23
22
Thanks. Your anwswer should be posted as best answer but I don't see that box.
Thanks again,
Carl23
Apr 22 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: James_101 | last post by:
My training piece is in Authorware. The user logs in with last name and a four-digit number. Authorware sends this user identifier to an asp page called db_read.asp. This file sends a SQL SELECT...
2
by: Santosh | last post by:
Hi, I have a script running which fails when it tries to execute an Update query, but when i try to run the query from the SQLQueryAnalyzer it runs fine. Can somebody try and explain this...
4
by: rdraider | last post by:
I am looking for some assistance with an update query that needs to link 3 tables: This query ran and reported over 230,000 records affected but did not change the field I wanted changed, not...
0
by: John Baker | last post by:
Hi; I am have a db back end situation, and have a problem with temp files. I am attempting to use temp files to manage the modification of a master file, and its not working right. I set up...
3
by: Greg Strong | last post by:
Hello All, Is the only solution to an update query which requires the records in a certain order to dump the records into a temp table in the required order, then do the update query? I've...
3
by: rdraider | last post by:
Hi all, Any thoughts on the best way to run an update query to update a specific list of records where all records get updated to same thing. I would think a temp table to hold the list would be...
2
by: Keith Wilby | last post by:
A2003. If I use a linked table (linked to a CSV text file) in an update query I get a "linked tables cannot be updated" error. What the? The CSV data is the *source* data and I'm not...
5
by: yuva17raj | last post by:
hi i am trying to update my sql table data with the csv/excel file data my sql table is as follows test test1 23 usd 25 ero 34 test and my csv file has
2
by: gagandeepsngh | last post by:
'Code for selecting a particular data from database '***** START ***** sSQL = "SELECT name FROM trans" cmd = New OleDbCommand(sSQL, con) Dim reader As OleDbDataReader = cmd.ExecuteReader()...
0
by: Alexis Ellis | last post by:
I am using adodb in python to connect to a database and run sql queries. I run several update queries in a table. Then I do a 'Select Into' to copy the table to a new database. All of the updates...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.