Solved

ACCESS 2003 Updateable query

Posted on 2012-04-10
2
245 Views
Last Modified: 2012-06-27
Why can't we update the data in the query when it runs.  It is not updateable.  It is based on two tables?

SELECT tblAbsentData.Date, tblAbsentData.UserID, tblAbsentData.Name, tblAbsentData.[Unplanned PDay Hours], tblAbsentData.[Occ Illness Hours], tblAbsentData.[Total STD/FML Hours], tblAbsentData.Team
FROM tblAbsentData INNER JOIN tblAbsentDate ON tblAbsentData.Date = tblAbsentDate.AbsentDate
WHERE (((tblAbsentData.Team)=[Forms]![frmVerifyTime]![cboTeam]) AND ((tblAbsentData.Uploaded)=No))
ORDER BY tblAbsentData.Name;



THANKS
0
Comment
Question by:eyes59
2 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
Comment Utility
There are a number of reasons why a query might not be updateable.

Best list I've found is at:  http://www.allenbrowne.com/ser-61.html

This is the item that I think gets most of us:

The fields in a JOIN are not indexed correctly: there is no primary key or unique index on the JOINed fields.
0
 
LVL 21
Comment Utility
<<Why can't we update the data in the query when it runs.  It is not updateable.  It is based on two tables?>>

It is common that multiple table queries are not updateable.

For a query to be upateable with multiple table you need to have the join using the primary key on one side. This is normally a One-to-many relationship.   In your case tblAbsentData.Date  or AbsentDate will need top be the primary key for the table.

Note: Date is the name of a VBA fucntion *reserved word)  and should not be avoided as field names.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
My experience with Windows 10 over a one year period and suggestions for smooth operation
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

744 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

11 Experts available now in Live!

Get 1:1 Help Now