473,471 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

This Recordset is not updateable - Error

anoble1
245 New Member
I have asked this question in the past but I can't figure this one out. It is a little different. I have a checkbox that keeps giving me the error.
I have 2 attachments.
Any help?

Is it because I am doing the filter in VBA?

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. 'Filter this form to show the feeder selected
  3. Forms!frmMain!frmAll.Controls("PO").SetFocus
  4. Me.RecordSource = "SELECT tblInformation.*, tblDivision.BranchName, tblInformation.PO FROM tblInformation INNER JOIN tblDivision ON tblInformation.Branch = tblDivision.BranchNumber WHERE (((tblInformation.PO)='" & Forms!frmMain!frmAll.Controls("PO").Text & "'));"

Aug 25 '17 #1

✓ answered by NeoPa

Sorry. Let me look at that again. I misread the SQL all scrunched up into a single line. I should know better. I should have reformatted before commenting.

Now I look more carefully it seems you have referred to a field in your WHERE clause that's included twice in the SELECT clause (tblInformation.PO). I often find it helps to take the resultant SQL string and create a QueryDef object with it and see what it reports when trying to run it. In this case, as a QueryDef object will automatically add an ALIAS for the second occurrence you may not see the same behaviour, but it's worth a try. I expect the solution is simply to remove the second instance of tblInformation.PO from your SELECT clause.

Other SQL debugging tips can be found at How to Debug SQL String.

3 2091
NeoPa
32,556 Recognized Expert Moderator MVP
Hi.

I don't think it's because you're doing it in VBA. It seems clear that it's because you have multiple tables without JOINs. See Reasons for a Query to be Non-Updatable for a better understanding of what makes a recordset non-updatable. The fourth item on the list describes your situation exactly.
Aug 25 '17 #2
anoble1
245 New Member
I guess I am not understanding. I don't have 3 or more tables and only 1 link here.
Aug 28 '17 #3
NeoPa
32,556 Recognized Expert Moderator MVP
Sorry. Let me look at that again. I misread the SQL all scrunched up into a single line. I should know better. I should have reformatted before commenting.

Now I look more carefully it seems you have referred to a field in your WHERE clause that's included twice in the SELECT clause (tblInformation.PO). I often find it helps to take the resultant SQL string and create a QueryDef object with it and see what it reports when trying to run it. In this case, as a QueryDef object will automatically add an ALIAS for the second occurrence you may not see the same behaviour, but it's worth a try. I expect the solution is simply to remove the second instance of tblInformation.PO from your SELECT clause.

Other SQL debugging tips can be found at How to Debug SQL String.
Aug 28 '17 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: sunj | last post by:
My database completely works in Dreamweaver MX at a local testing level, but as soon as I upload and access my web pages remotely I get this error on the browser. Can anyone help?...
0
by: mad | last post by:
I am new here and don't know if someone has encountered and discussed this problem before. I appreciate any help to this problem. I am building a new Oracle database (8.1.7) and Win 2000/IIS 5...
7
by: Martin Lacoste | last post by:
I have a very basic query that Access 2000 will not allow to be updatable. I've gone through all the situations in the help file where data cannot be updated, and I don't see that this query...
3
by: dd_bdlm | last post by:
Please help this one is driving me mad! I have searched and read all the topics on the error message I am receiving but none seem to apply to me! I have quite a complex query linking all parts...
3
by: Nathan Bloomfield | last post by:
Hi there, I am having difficulty with a piece of code which would work wonders for my application if only the error trapping worked properly. Basically, it works as follows: - adds records...
6
by: ZRexRider | last post by:
I've been reading the newsgroups and most of the solutions for this message are simple and obvious but unfortunately don't solve my problem. I have an MS-Access 2002 ADP application that...
3
by: ruthboaz | last post by:
Hi, I am upgrading the current ms access .mdb file to a .adp with sql server back end. I have been converted tables, forms, reports to .adp.. The tables are reflected at the server. a) ...
1
by: AliHabib | last post by:
when trying to set the sql statement by this code give error ADODB.Recordset (0x800A0E78) Operation is not allowed when the object is closed. /SearchSubject.asp, line 129 if...
5
by: NaughtyZute | last post by:
I've looked at everything I can find on the Internet for why I get the error "This recordset is not updateable" when attempting to change a data element on a form. I created the form in Access 2007...
3
by: NaughtyZute | last post by:
I'm trying to consolidate all my recordset creation to this function. Passing in a SQL string and returning the recordset. I'm getting an error: Invalid use of property... Public Function...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.