473,385 Members | 1,610 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,385 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 1734
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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...

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.