473,387 Members | 1,742 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,387 software developers and data experts.

No Value Given for one or more required Parrameters

171 100+
Hi Everyone,
I have been using access query builder for a while now and want to perfect my SQL coding. I am trying to run this query in VBA but it gives the following error: Run-time error '-21427217904 (80040e10)': No Value Given for one or more required Parrameters.

Expand|Select|Wrap|Line Numbers
  1. strSQLStartNullEndNull = "SELECT Date, UserID, TimeEnd, TimeIn " & _
  2. "FROM tblTimeCard " & _
  3. "WHERE Date= " & Date & " AND UserID = " & CurrentUser & _
  4. " AND TimeEnd Is Not Null AND TimeIn Is Not Null"
  5. Set cnn = CurrentProject.Connection
  6. rst.Open strSQLStartNullEndNull, cnn, adOpenDynamic, adLockOptimistic
I pasted this same query in access query builder and it works perfectly this is what the code was:
Expand|Select|Wrap|Line Numbers
  1. SELECT Date, UserID, TimeEnd, TimeIn FROM tblTimeCard WHERE Date=  Date () AND UserID = CurrentUser () AND TimeEnd Is Not Null AND TimeIn Is Not Null
Sep 26 '08 #1
3 2079
FishVal
2,653 Expert 2GB
Hello, iheartvba.

The following stuff may be helpful for you.
Literal DateTimes and Their Delimiters (#).
Reserved Words in Access, Especially Date and Time

Regards,
Fish.

P.S. SQL expression you've pasted into query builder is well not the same as that the code generates.
Sep 26 '08 #2
iheartvba
171 100+
Thanks A Lot, that fixed it, as soon as I saw the solution I remembered I faced with this problem maybe last year. So I am sorry if I have double posted.


P.S. Keep it up you guys are a salvation to newbie programmers.
Sep 29 '08 #3
FishVal
2,653 Expert 2GB
You are welcome.

Best regards,
Fish.
Sep 29 '08 #4

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

Similar topics

13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
7
by: mp | last post by:
No value given for one or more required parameters. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information...
3
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I...
3
by: Grayscale | last post by:
Hello, When I execute the code below, I get: "Microsoft JET Database Engine (0x80040E10) No value given for one or more required parameters." error message in the first line. Rs.Open...
2
by: nhaider | last post by:
Hi All I am trying to insert the field value which is depended on formula into the table. The given field me.field28 and me.nodlyd are working but me.field34 is not working and the givne error...
15
by: Dave | last post by:
I am getting the error above intermittantly with an ASP 3.0 page using an MS Access 2003 database. I have searched Google extensively and found the following possible causes for this error: A...
0
by: Gwen Crutcher | last post by:
I keep getting the error "No value given for one or more required parameters", but not sure why. Can anyone please look at my code snipet and see if you see any reason why I could be getting this...
0
by: AxleWacl | last post by:
Hi, The below error is what I am receiving. The code im using is below the error, for the life of me, I can not see where any parameter is missing..... Server Error in '/FleetcubeNews'...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.