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

Update Query not returning results

3
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 1821
FishVal
2,653 Expert 2GB
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
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 Expert 2GB
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
Hi Fish

Okay, I think this is just a simple misunderstanding 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
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...
4
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...
17
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...
7
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...
9
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...
8
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: ...
3
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...
1
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...
16
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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.