Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Query Based on 1-to-1 relationship not updating

Status
Not open for further replies.

pbbriggs

MIS
Jun 24, 2003
68
US
I have a simple select query based on two tables with a one-to-one relationship (which is defined in the relationships window). For some reason, I am unable to change data in either of the underlying tables via the query.

I have a nearly identical query which joins two other tables in the same fashion - the SQL statements look identical except for the field names - and the other one allows updates just fine.

Is there something that might be preventing my data from being updated? I tried re-definining the relationships and re-creating the query, but neither action helped.

Also, I don't know if this makes a difference or not, but I don't receive any kind of error (or even any message down at the bottom of the screen). It just won't allow the changes.

Thank you
 
It would make it easier to answer your question if you'd post your SQL
 
Thanks. Sure, here is the SQL. There is a 1-to-1 relationship between the tables BankUnmatched and Bank. The PK is actually two fields (BID and Date) but this does not seem to be posing any problems anywhere else (and I have another similar query joining two tables with a dual-field PK that works fine).

Even if I remove the "Bank.Notes" from the SELECT statement (which is the only field I want from that table, and the only reason I need the query in the first place), it will still not allow me to change any data in the query.

SELECT BankUnmatched.Matched, BankUnmatched.BID, BankUnmatched.Type, BankUnmatched.Date, BankUnmatched.Amount, Bank.Notes
FROM Bank INNER JOIN BankUnmatched ON (Bank.BID = BankUnmatched.BID) AND (Bank.BDate = BankUnmatched.BDate);

Again, I don't get an error, it just won't let me update any of the data.

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top