Solved

Making the result set of a query involving more than one table updateable

Posted on 2013-01-29
7
307 Views
Last Modified: 2013-01-29
I have joined two tables in a query on the first name and last name  (see attachment) . I plan to include this query in a form that will allow me to view the entries and make changes to them where applicable. The problem I am facing is that the result set from the query is not updateable. It only allows me to view the entries but not edit them. How can I remedy this situation?
Edit-Query-Results.jpg
0
Comment
Question by:geeta_m9
  • 4
  • 2
7 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 38831630
To make that query updateable, you should be storing the Primary Key from the Applications table in the Statements table, and using that key field as the link between the two tables.
0
 
LVL 77

Accepted Solution

by:
peter57r earned 250 total points
ID: 38831636
Try this...

Add a primary key to the Statements table.  (ID)
Include both primary keys in the query output.

See if that gives you an updateable result.
0
 

Author Comment

by:geeta_m9
ID: 38831652
The primary key in both the tables is a combination of the first name and last name. You mean to say I have to have a single field as the primary key, and cannot use a combination of two fields?
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:geeta_m9
ID: 38831662
I guess it is my fault...I did not specify it that way in the table design.
0
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 250 total points
ID: 38831665
From your image, it looks like you have the ID field in the Applications table set as the primary key...  My suggestion was to add that as a foreign key to your other table and link on the ID instead of the two name fields (which you could then remove from the statements table).


Anyhow, try Pete's suggestion first.
0
 

Author Comment

by:geeta_m9
ID: 38831755
If I made the primary key a combination of the first name and last name like so (see attached), it seems to work. The ID was just an autonumber created by Access which I did not use. I already have hundreds of records in each of the tables and don't feel like going in and assigning the matching ID from the Applications table to each of the records in the other two tables. Next time, though I will use a valid ID field as it will save me a lot of trouble that way.
Combination-Primary-Key.jpg
0
 

Author Closing Comment

by:geeta_m9
ID: 38831775
Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Direct Mail software 4 42
Tags from access to excel 3 26
Compile Error 7 39
Why doesn't duplicate values work on this spreadsheet? 6 31
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
This article will show you how to use shortcut menus in the Access run-time environment.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now