473,387 Members | 1,891 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.

VB6 Data Report in Code

Richard Alvarez
Need help my data report

I got this error "No value given for one or more required parameter."

here is my code...
Expand|Select|Wrap|Line Numbers
  1. Dim rsData As New Adodb.Recordset
  2. On Error GoTo err:
  3.     If rsData.State = adStateOpen Then rsData.Close
  4.         rsData.Open "SELECT * FROM EMPLOYEEINFO WHERE EMP_ID=" & Me.lstEmployeeMain.SelectedItem.Text & ";", DBConn, adOpenKeyset, adLockPessimistic
  5.         Set DataRep_Employee_Info_Single.DataSource = rsData
  6.         DataRep_Employee_Info_Single.Show 1
  7.     Exit Sub
  8. err:
  9.     MsgBox err.Description, vbCritical, "Error"
  10.     Set rsData = Nothing
Thank you so much in advance..
May 14 '11 #1
2 2116
9815402440
180 100+
this error occurs when a field you are referring in the query does not exists in the table. in this case check whether EMP_ID exists in the EMPLOYEEINFO table?
regards
manpreet singh dhillon hoshiarpur
May 14 '11 #2
Thank you so much it did solve the problem. And also I discover one more thing with my code; I need to use this syntax for it to work properly.
Expand|Select|Wrap|Line Numbers
  1. rsData.Open "SELECT * FROM EMPLOYEEINFO WHERE EMP_ID=" & Trim(Me.lstEmployeeMain.SelectedItem.Text) & ";", DBConn, adOpenKeyset, adLockPessimistic
Thank you again for your quick reply
May 17 '11 #3

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

Similar topics

5
by: David Gray | last post by:
Greetings all, How can I use ADODB to return all tables in an access DB chosen by the user? I'm able so far to select the DB file and build up my connect string, but I would like to offer a...
0
by: DhavalPatel1983 | last post by:
Hi, I need help in VB Datareport, my problem describe as below.... I have one Bank application project with all the information like Deposite,Clearness,Check,Cash,Creadit,ATM...
0
by: DhavalPatel1983 | last post by:
Hi All, I need ur help in Visual Baisc for Data Report. Description ========= I have one Project Which include One Data Envirnment,Data Report,Form Which contain Listview,Text box, and...
3
by: mutrus | last post by:
My data report print data in a different place than where it is supposed to. I have a sum function placed in the report footer section of the report however when the report is run the sum function is...
2
by: THEAF | last post by:
hi im trying to produce a data report for my computing project. the data report shows information on an examiner such as name & address. It also shows the number of scripts that examiner has...
1
by: sudhirarora | last post by:
I have created one VB Data report for which I am using Data Envoirnment. The commandtext of Data envoirnment's command is changed at runtime and the report comes correctly. However when I run the...
1
by: dontbe | last post by:
Hi Guys, I'm newbie in this forum,.. and i'm having trouble with Data Report. I've been read about How to Create Dynamic Report (thanks to Creative1). But now i have some other trouble (sorry...
3
by: manjeetgrang | last post by:
hi i have designed a data report and data is coming from a temptable.Data in temp table is coming from couple of tables. at run time first time report shows all the data when ever i use report...
1
by: dzgreek | last post by:
I use VB6 and for the first time its Data Report designer - I am using it without a data environment and I set my reports datasource property within my code. All I ever get is this error message...
0
by: hadspqn | last post by:
Hello, I'm using Data report in VB6. In report it shows all records and it takes page break at its own. I wish to set page break in VB code after particular number of records say 10 records. so...
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: 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
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: 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
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
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.