Solved

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

Posted on 2013-01-29
7
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

749 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