Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 318
  • Last Modified:

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

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
geeta_m9
Asked:
geeta_m9
  • 4
  • 2
2 Solutions
 
mbizupCommented:
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
 
peter57rCommented:
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
 
geeta_m9Author Commented:
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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
geeta_m9Author Commented:
I guess it is my fault...I did not specify it that way in the table design.
0
 
mbizupCommented:
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
 
geeta_m9Author Commented:
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
 
geeta_m9Author Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now