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

VB Report - Run time error-2147217900-(80040e14)

When i run the report its showing runtime error in this line as.... (Syntax error -
missing operator in query expression)

DataEnvironment1.rsCommand1.Open ("select * from GRNTrans where SUPPLIER NAME = " & Combo1 & " AND GRNDate between # " & DTPicker1 & "# and # " & DTPicker2 & "# ")


//Dim DB As Database
Dim Enq As Recordset
Private Sub Cancel_Click()
Unload Me
End Sub

Private Sub Form_Load()
Set DB = OpenDatabase(App.Path + "\Material Management.mdb")
Set Enq = DB.OpenRecordset("SUPPLIER")
Call LoadSUPPLIER
Combo1.Visible = True
End Sub
Private Sub ShowReport_Click()
DataEnvironment1.rsCommand1.Open ("select * from GRNTrans where SUPPLIER NAME = " & Combo1 & " AND GRNDate between # " & DTPicker1 & "# and # " & DTPicker2 & "# ")
DataReport1.Show
DataReport1.ZOrder (0)
End Sub

Public Function LoadSUPPLIER()
Combo1.Clear
If Enq.RecordCount <> 0 Then
Combo1.Visible = True
Enq.MoveFirst
Do While Not Enq.EOF
Combo1.AddItem Enq.Fields(1)
Enq.MoveNext
Loop
Else
Combo1.Visible = False
End If
End Function//

Kindly send me the solution
Oct 23 '07 #1
1 2654
creative1
274 100+
I think you should use
' " & Combo1 & " ' insead " & Combo1 & " because name isn't numeric.
Oct 23 '07 #2

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

Similar topics

1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
9
by: MLH | last post by:
Trouble is, it doesn't happen every time. Yesterday, for example, it happened only once and not again afterward. Some days ago, a similar situation. Today, well - I tried 7 times straight to open...
8
by: | last post by:
hi, i have a form on which a user can choose specific criteria such as dates etc, in order to filter the report that is called from the form. i do this by using the Where section of the...
2
by: Denise | last post by:
How do I get the report to not spend time pulling up the data when I'm going to bail out of the report anyway? Below is the code in my report. I first show the user a form where they can select...
3
by: Thad | last post by:
I'm new to C# and I was trying to create a Crystal Report. I've designed a simple report and I've used several methods for attaching fields to the report at design time. I've used a DataSet that...
1
by: vipindev.s | last post by:
hi all i am not much expert in asp.net. i am using crystal rpt for report generation. is any other report generation method is available??? i use push method to creat report, and it is working...
2
by: rinmanb70 | last post by:
I have a QBF form/query and a report from the QBF that shows the results of the QBF. I would like to show the criteria on the report that was used in the QBF to get the info on report. I can't...
10
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines....
11
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
11
by: Gord | last post by:
When I open a certain report, it runs some code that generates the records that will be displayed in that report. This works fine. When I go to print preview the report it appears that the code...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...

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.