By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,151 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

Filtering data For Printing Report

P: 2
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
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, 176 views)
Nov 15 '13 #1
Share this Question
Share on Google+
2 Replies

P: 8
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

P: 2
this is my first time using ms access sorry!!
Nov 19 '13 #3

Post your reply

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