473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

RunSQL Error- Run time error 2342

i try this one:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command8_Click()
  2. Dim strsql As String
  3.  
  4. strsql = "SELECT [hotovy produkt].nazev FROM [hotovy produkt] WHERE ((([hotovy produkt].nazev)=[Forms]![vysledek]![Text1]));"
  5.  
  6. DoCmd.RunSQL strsql
  7.  
  8. or this one:
  9.  
  10. Private Sub Command8_Click()
  11.  
  12. DoCmd.RunSQL "SELECT [hotovy produkt].nazev FROM [hotovy produkt] WHERE ((([hotovy produkt].nazev)="auto"));"
  13.  
  14.  
I still get the same error.

Any explanation.

thank u
Oct 13 '15 #1
2 1737
Luk3r
300 256MB
I believe you must do your query like the following, since RunSQL is used for actions like UPDATE and DELETE

Expand|Select|Wrap|Line Numbers
  1. DoCMD.OpenQuery strsql
Oct 13 '15 #2
now it show me error 7874 - microsoft access cant fint the object "select etc.....


Expand|Select|Wrap|Line Numbers
  1. Private Sub qryvba_Click()
  2. Dim strsql As String
  3.  
  4. strsql = "'SELECT [hotovy produkt].nazev FROM [hotovy produkt] WHERE ((([hotovy produkt].nazev)=[Forms]![auto]![Textbox1]))'"
  5.  
  6. DoCmd.OpenQuery strsql
  7. End Sub
thank u
Oct 13 '15 #3

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

Similar topics

1
by: abhilash agarwal | last post by:
hi all!! pl help me i m getting a run time error "memory address .... refer to this location....... memory could not be written at this location....." ..... means some memory address when...
1
by: Sunil Korah | last post by:
In one of my programmes I am getting this error when I use DoCmd.RunSQL. The message states "A RunSQL action requires an argument consisting of an SQL statement". Originally my statement was ...
5
by: NB | last post by:
Hi In my 2 years with Access I have never seen this, now it makes me mad In an unbound form frmTH I have a frmList which is a continous form In its on current event, I synch 4 of its fields...
2
by: Ricardo Magalhães | last post by:
Hi, I using this code, to connect with a paradox file with ASP.NET. The first time its connect ok, but others times occurs the error: "ERROR - no error information available" I close all...
10
richardhodge
by: richardhodge | last post by:
I am a VB6 database programmer and have run into a small problem. The company I work for primarily uses Microsoft Access 2000 for the database that is the back end for our software. Well the...
5
by: Pranav | last post by:
#include <iostream> #include <conio.h> using namespace std; class Base{ public : Base(){ ib = 123; cb = 'B'; } int ib; char cb; virtual void print(){ cout << "Base Class\n" ;}
5
by: stpgmn | last post by:
I'm executing the following procedure within Access mdb. The query that I'm trying to run works nolrmally when executed as Query. Do anybody has any idea of reason of the error?. Thanks a lot ...
13
Topbidder
by: Topbidder | last post by:
I have this error on the code Parse error: syntax error, unexpected '"' in /home/topbidd/public_html/bid2/bid_classic.php on line 159 now i thought the error was this It seems that the...
9
by: AMickey | last post by:
I'm getting a run time error with this vba code and can't figure out how to get it to work. It runs from a button on a form and should update a table. Any help would be appreciated. The code is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.