|
| |
|
|
ilovefood
Posts: 7 From: None Status: offline
|
update query problem - 8/15/2001 20:43:00
I have written an update query using the DRW--it is updating a query in Access; it works great until I change a record for one field which is based on a lookup table. Example: 50 records where one field is a choice of cups, glasses, and tumblers. Now, when the user updates/changes cups to glasses, ALL the records (say 28) that are cups are now glasses. I have a primary key for each record. I have thought of enforcing referential integrity between the two tables that create the query, but can't because it says it's violated ref integ rules.Anyone been down this road before?
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: update query problem - 8/15/2001 20:07:00
Are you changing the lookup table or the field? It sounds like you may actually be updating the lookup table but I'm not sure....Also, be sure you're using your primary key as the WHERE parameter. EDIT: I can't spell worth do-do... [This message has been edited by rdouglass (edited 08-15-2001).]
|
|
|
|
ilovefood
Posts: 7 From: None Status: offline
|
RE: update query problem - 8/15/2001 20:14:00
Correct. As the query stands it is updating the lookup table as well. I definitely do not want this to happen--just change the data for the record in the primary table. My primary key is the WHERE parameter. I am trying to prevent just putting all the fields in one table and avoiding the lookup altogether--but surely this can be done without that....right?  quote: Originally posted by rdouglass: Are you changing the lookup table or the field? It sounds like you may actually be updating the lookup table but I'm not sure....Also, be sure you're using your primary key as the WHERE parameter. EDIT: I can't spell worth do-do... [This message has been edited by rdouglass (edited 08-15-2001).]
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: update query problem - 8/15/2001 20:28:00
Are you updating via a query (in Access) or updating directly into the table (not the lookup table)???
|
|
|
|
ilovefood
Posts: 7 From: None Status: offline
|
RE: update query problem - 8/15/2001 20:46:00
Good question. I am using a custom update query in the DRW which updates a query in Access which has one field in particular that is based on a lookup table (my example of cups, glasses, tumblers). The other fields update fine, this one culprit field contains the lookup data which, when changed from cups, to say, glasses, changes all the records which were cups to glasses in the primary table and the lookup table.What a sentence! I hope it makes sense! 
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: update query problem - 8/15/2001 23:17:00
Try updating the table instead of the Access query....
|
|
|
|
ilovefood
Posts: 7 From: None Status: offline
|
RE: update query problem - 8/15/2001 23:27:00
I solved this for now by choosing to put all the fields in one table--dissing the lookup. All updates work fine. Thanks rdouglass for your responses and help, I really appreciate it. If anyone out there sees this and has another solution for updating a query that has a lookup attached to it, let me know.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|