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

Filtering data For Printing Report

Hi my name is ley and i have finishing my ojt project its a record report system my project is in 85% completion and this
is problem

I have a 4 combo box for options and 2 text box for dateFROM and dateTO 5 boxes in total to be fill up

and this is the query i worked up....
Expand|Select|Wrap|Line Numbers
  1. Set rs = New ADODB.Recordset
  2. rs.Open "Select * from tbleout where Recipient like '" & Combo1.Text & "%' OR '" & Combo2.Text & "%' AND DocumentType like '" & Combo3.Text & "%' AND Origin like '" & Combo4.Text & "%' AND Date between #" & Text1.Text & "# AND #" & Text2.Text & "#", cn, adOpenKeyset, adLockOptimistic
Problem:
1. my query is running the problem is the output is not match to the filter condition i fill up..Example i want accredition for document type and Maximo for Origin..but the output is he displaying all the accredition document type and disregard the condition of maximo in origin..

2. i have a problem in this query i made. i need to input a date to the 2 text box if not its displaying an error said " syntax error in date query"

by the way im using vb6.0 and MS access

i hope u can help me guys i appreciated it so much tnx in advance
sorry for my poor english ^^
Attached Images
File Type: jpg Filter Print.jpg (51.8 KB, 240 views)
Nov 15 '13 #1
2 1870
Just curious but is there a reason you did not build a query to resolve this in MS Access? I ask since using the query builder usually gives you a very usable sql statement and you can refer to objects on the form easily by use of criteria builder.
Nov 15 '13 #2
this is my first time using ms access sorry!!
Nov 19 '13 #3

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

Similar topics

5
by: AstronusX | last post by:
Hi, I'm looking for good printing/reporting tool that customize base on user need, like add more columns to report(design at run-time) for the products that we make? Any recommendation?? Thank...
3
by: Ellen Manning | last post by:
I've got an unbound text box on a subreport that doesn't display all it's data. At most the data may be 50 words long. The text box is 2" wide and only enough text to fill the width once is...
6
by: Ray | last post by:
Hi all, While I use the ReportDocument of vb.net to set filter to the data to the Crystal Report, it is successful for the first time while running the program. However, for the second time while...
0
by: Ray | last post by:
Dear Bernie, Yes, if the same pfieldname is used. The same data will be filtered. But I only use the code shown you before. I have not used any dataset or datatable. How to fix the problem?...
3
by: TS | last post by:
Hi all, In my windows form, I need the user to select a client name from a combo box and click on a button that opens another form having CRViewer showing the data for that client selected. I...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
1
by: EgoSum | last post by:
Does anybody can explain in steps how can I load xml data in report and open it in reportViewer? There's a short xml example ProductSales.xml: <?xml version="1.0" standalone="yes"?>...
0
by: Sheryl 37 | last post by:
Can any1 give me the coding for the following problem.....How to i filter data in Crystal Report using a combo option (e.g Company Name). There1 combo box for the Company, and a crystal report....
3
by: STEPHENSS | last post by:
Hi, I have a crystal report that has many subreports over many pages and Iam getting the following error Unable to save data with report, the save data is incomplete generate the saved data Yes...
3
by: hiteshgupta | last post by:
I have a table with following fields - SDate - TestCount Now, the values in the sdate are typically like 01/01/2012 06:45 PM,01/02/2012 06:45 PM,01/01/2012 07:45 PM,10/10/2012 06:45...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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
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?

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.