473,782 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update Query not returning results

3 New Member
Sorry if I've missed something obvious, but I'm trying to do a really basic update query in Access 2007, and I can't get it to work.

UPDATE DISC INNER JOIN DISC2 ON DISC.DiscID = DISC2.DiscID SET DISC.Filename = [DISC2].[Filename];

The Filename field in DISC is null throughout. Some of the values (62 records) in DISC2 are populated. Other than this, both tables are identical.

I'm trying to get the DISC2 values into DISC. The results grid shows just one record which is blank.

I've tried this 4 or 5 different ways. Thanks for any suggestions.
Mar 24 '08 #1
4 1846
FishVal
2,653 Recognized Expert Specialist
Hi, JamieF.

Try to run simple SELECT query on the same table join and check whether the records are being combined as you are expecting.

Regards,
Fish
Mar 24 '08 #2
JamieF
3 New Member
Hi Fish

Thanks for the reply. Yes they are. Obviously a Select query needs to be a little different, but the following combines the tables as expected:

SELECT DISC.[Disc Num], DISC2.FileName
FROM DISC INNER JOIN DISC2 ON DISC.DiscID = DISC2.DiscID;
Mar 29 '08 #3
FishVal
2,653 Recognized Expert Specialist
Hi Fish

Thanks for the reply. Yes they are. Obviously a Select query needs to be a little different, but the following combines the tables as expected:

SELECT DISC.[Disc Num], DISC2.FileName
FROM DISC INNER JOIN DISC2 ON DISC.DiscID = DISC2.DiscID;
Hi, JamieF.

That means UPDATE query is supposed to run on a desired records.
The only reason for the fault I could figure so far is possible key/index violations.
Access warns user about such kind of problems unless these warnings were accidentally disabled. Run in VBA immediate window
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SetWarnings True
  2.  
and then try to run the query. Check for possible Access warnings.

Regards,
Fish
Mar 29 '08 #4
JamieF
3 New Member
Hi Fish

Okay, I think this is just a simple misunderstandin g on my part. When I do View (datasheet), none of the replacement values are shown (just the old blank values). When I Run the query, it does seem to be working.

Thanks for your help.

Jamie
Mar 30 '08 #5

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

Similar topics

3
2016
by: Mohammed Mazid | last post by:
Can anyone please help me here? Basically I have modified the source code and understood it but when I update a record in the db using a JSP, it gives me an error "The flight you selected does exist." Althought there is not selection going on, instead it is entered, I need it to match the flight in the db using the flightNo. I want all the attributes to be changed apart from the flightNo itself as it is it's associated details I need...
4
10237
by: Surendra | last post by:
I have this query that I need to use in an Update statement to populate a field in the table by the value of Sq ---------------------------------------------------------------------------- Inline View Query: Select Sq from ( Select substr(to_date(End_Date,"DD-MON-YYYY"),4), End_Date, Rank() Over (Partition by substr(to_date(End_Date,"DD-MON-YYYY"),4) Order by End_Date) As Sq
17
5029
by: kalamos | last post by:
This statement fails update ded_temp a set a.balance = (select sum(b.ln_amt) from ded_temp b where a.cust_no = b.cust_no and a.ded_type_cd = b.ded_type_cd and a.chk_no = b.chk_no group by cust_no, ded_type_cd, chk_no)
7
11484
by: sime | last post by:
Hi, I have a blob field in a mysql database table. I want to copy a blob from one record to another. I am having trouble transferring the data via a php variable. Maybe I need to addslashes or convert to Hex or something. I've tried a few things but can't quite get it. Here is simplified code. mysql_select_db($dbname, $connection);
9
4356
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my predecessor, I hasten to add) so that each day it creates a copy of the record for each company, changes the date to today's date, and prompts the user for any changes of ratings on that day. The resulting data table grows by approx 600 records per...
8
3724
by: Maxi | last post by:
There is a lotto system which picks 21 numbers every day out of 80 numbers. I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21) Here is the structure and sample data: "Date","P1","P2","P3","P4","P5","P6","P7","P8","P9","P10","P11","P12","P13","P14","P15","P16","P17","P18","P19","P20","P21" 1/1/2005,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 1/2/2005,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
3
3551
by: Riley DeWiley | last post by:
Using OLEDB, Jet 4.0, C++, Windows. I have been baffled by UPDATE queries that return S_OK but do not change the data in the database. It seems that UPDATEs do not update until the CDataSource object goes out of scope, in some cases, they seem not to update at all. Apparently the data is being cached and transmitted through some kind of flushing mechanism. I would like to "force" writes of data after executing an UPDATE query through...
1
1763
by: thepresidentis | last post by:
here is my problem, i have a website that compiles concert listings for users to search for shows in their local area, i ran into a problem with returning search results due to an improper format of my query, So i formatted the query properly Thanks to steve Klein :) , and all worked fine because there was only 1 show in my data base, I tryed to search for the show and it returned properly, and then i searched for the show with a different...
16
3520
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for renaming the duplicate records? My thinking was to take the results of the duplicate query, and somehow have it number each line where there is a duplicate (tried a groups query, but "count" won't work), then do an update query to change the duplicate to...
0
9479
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10311
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10146
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9942
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7492
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6733
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.