473,378 Members | 1,619 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,378 software developers and data experts.

Merging a table and a query

I have a table CREP and a query [CREP DETAILS].
Basically i want to update the data on the table CREP based on the data in the query [CREP DETAILS].
Both the table and the query have a common column, that is date.
Crep has a mins and crep details has a totmins column.

What I want to do is update the value of mins in CREP to value of totmins in CREP DETAILS where CREP.DATE=[CREP DETAILS].DATE

I have been working onthis query for quite some while now and inner joins dont seem to work and i get the error use an updateable query.

I am a newbie to Access so i require help with this one.
Aug 19 '08 #1
2 1507
hyperpau
184 Expert 100+
I think you almost got the answer already.

From the looks of it, you are trying to update the query joining the table and the query itself.

My suggestion is to try to create an Update query and bind this to the table using the Date as the Criteria and the Mins column to be the one updated.

You can use Access help to find out how to create Update queries.
Aug 19 '08 #2
Stewart Ross
2,545 Expert Mod 2GB
Hi. Try HyperPau's suggestion and see how you get on. However, I think you will find that the result is still not updatable, as a result of the totalling. Access is very limited in what it considers updatable in such circumstances - see this Microsoft Knowledgebase article for details. Using aggregation - totals and so on - renders a query non-updatable, and even if you join that to another table the same thing applies - which is very frustrating. The Knowledgebase article suggests using domain aggregate functions - DCount, DMax and so on - but these can be very slow for large queries.

I get round this by taking a two-stage approach. First, use the aggregating query (the one doing the totalling) as a Make Table query to write a temporary table to the database, then create an update query by joining the temporary table and the table you want to update. Tables joined to tables without aggregation are always updatable.

If this works out for you, and you need to do this kind of update often, you can always set up an Access Macro to run the two actions sequentially. That way there is no possibility of forgetting one or other step.

-Stewart
Aug 19 '08 #3

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

Similar topics

2
by: Emmett Power | last post by:
Hi, I have an Access table with a number of records which refer to the same person but with data in different fields. So for example the table would look like this: Name..............Field...
1
by: svdh | last post by:
I have posed a question last saturday and have advanced alot in the meantime. But I am still not there Problem is that I try to merging various fields from various tables in one document in Word...
2
by: Bubb | last post by:
I have an Access database with one table that I use for stuff I sell online. Each record has the following fields: Unique Id, Cost, and Item Description. I just obtained some more stuff with its...
1
by: mrclash | last post by:
Hello, I have a Database in a SQL Server 2000 where I have different users tables with equal fields like this: id (int) email (varchar) name (varchar) address (varchar) joinedon (datetime)
6
by: John | last post by:
Hi I have three tables with a common id with which they can be linked. I need to merge them in a way that the resultant table has all records from three tables. Below is what sort of result I am...
8
by: babyangel43 | last post by:
Hello, I have a query set up in Access. I run it monthly, changing "date of test". I would like this query to be merged with a Word document so that the cover letter is created in Word, the fields...
3
by: Ralph Smith | last post by:
I have two identical databases on two different servers and I need to add the data in tables from one server to the tables in the other server. Is there a way to do that in mysql? thanks, Ralph
7
by: phillyon | last post by:
I'm looking to print off a booking form based on the data in 3 linked tables by merging it in Word. Please if you know of a better way, let me know. Bookings table contains summary, cost,...
0
by: jeoffh | last post by:
Background: I am trying to "merge" some attributes into an existing XML column in my MS SQL 2005 database. The general idea is that I have an XML column in a table and I would like to update/delete...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.