will try
Thanx
Main Topics
Browse All TopicsI have a simple Data Report code using DataEnvironment:
- I use ODBC to access the database (connections)
- in the Command1, i have a select script
"SELECT VendorTable .* FROM VendorTable"
- in the child Command2, I have another select
"SELECT VendorTableTrans .* FROM VendorTableTrans"
- in DataReport, I inserted Group/Header and pull the needed fields and sub-totals
- in the Form, all I have is a command button with the following code:
Private Sub Command1_Click()
DataReport1.Orientation = rptOrientLandscape
DataReport1.Show vbModal
End Sub
This works fine and displays all vendors with their subtotal
I want is to include a field in the form and modified my command button to filter out the selected vendor and in my Command1_Click() subroutine, to filter the report
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
hm share your email so I mail you code. or I am going to upload it some where and soon will send u link.
step 1: create a blank new vb project
2: add dataEnvironment
3: make connection to db
4: make a command and start query builder
5: make a query and in where class just put ? in criteria box
6: close query builder
7: open command properties
8: set name of parameter its datatype
9: make report on this command (Recordset)
10: on button write code
DataEnvironment1.Command1 "criteria text" 'like author name or id
DataReport1.Show
Business Accounts
Answer for Membership
by: LuhanaPosted on 2009-08-26 at 15:03:01ID: 25192750
make query by SQL builder then on field where u want to make filter put ? in criteria section.
for example
SELECT Au_ID, Author, `Year Born` FROM Authors WHERE (Au_ID = ?)
then open command propties and set name of your parameter and data type etc.
on button code
check if rscommand1 state open then close
'open again
DataEnvironment1.Command1 Text1.Text
DataReport1.Show