Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2007, 05:22 PM
Friend of Wrox
 
Join Date: Apr 2006
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default recordset not updatable

I have a problem with some of my forms...

I have some fields on this continuous form where the user has to select a Yes or No value in a combo box. I'm using different combo boxes because the form is used as a checklist.I prefer using combo boxes because it will be more clear for the users (instead of using a check box).

However, when I try to move around on this form, I always get an error message telling me the recordset is not updatable.

This form gets its data from a query. When I try to run this directly in the query I can't select any value in the combo boxes either. I guess the form is not the problem but the query is, because editing directly in the table works and the problem starts in the query.

Does anyone knows what I have to do to solve this problem? Is it possible that the query is in some kind of 'read only'?

 
Old February 13th, 2007, 08:41 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Some queries are not updateable. I usually don't base forms on queries, although some people prefer it, so I am not too familiar with the rules here. This is a limitation in SQL Server as well, so it involves the SQLanguage, and not Access, either. I would suggest a review of updateable queries.

Can you create the form on a table? If the table contains look ups, the record will be updateable.


mmcdonal
 
Old February 13th, 2007, 10:01 AM
Friend of Wrox
 
Join Date: Apr 2006
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The query's SQL is the following:

SELECT TOP 10 tblTestBuy.Datum, tblTestBuy.Artikelnummer, tblArtikelen.Artikelnaam, tblTestBuy.Ptag, tblTestBuy.Volledig, tblTestBuy.Kwaliteiten, tblTestBuy.Koopinstructies, tblTestBuy.Voorradig, tblTestBuy.Invoerdatum, tblTestBuy.Afdeling
FROM tblTestBuy LEFT JOIN tblArtikelen ON tblTestBuy.Artikelnummer = tblArtikelen.Artikelnummer
WHERE (((tblTestBuy.Datum)>=Date()-6 And (tblTestBuy.Datum)<=Date()) AND ((tblTestBuy.Invoerdatum)=Date() Or (tblTestBuy.Invoerdatum) Is Null) AND ((tblTestBuy.Afdeling)="BA06"))
ORDER BY tblTestBuy.Artikelnummer;

I don't know if this can be put into the form and if yes how... I guess the on open event or on load event has to be used, but I don't know how to insert this...


 
Old February 13th, 2007, 05:02 PM
Friend of Wrox
 
Join Date: Apr 2006
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found another way to make this work. I'll have to create much more tables, query's and forms that I wanted to, but it seems to work that way so...

Thanks for trying to help






Similar Threads
Thread Thread Starter Forum Replies Last Post
Operation must use Updatable query Gnub Beginning VB 6 4 June 19th, 2007 12:32 PM
Must use "updatable query" bc7 ADO.NET 4 January 30th, 2007 03:58 AM
updatable subform Vince_421 Access 1 June 1st, 2006 07:49 AM
Error in view updatable pavanp SQL Server ASP 1 September 7th, 2004 09:35 PM
Access 2000 forms not updatable re_anu Access VBA 4 May 28th, 2004 10:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.