Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 24th, 2004, 10:37 PM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sjperl
Default Print selection criteria on report

I created a form that allows the user to enter selection criteria (including date range) in unbound text boxes and then print a report showing the selected records. I generate a query by constructing the WHERE clause in the SQL statement from the selected parameters. This works fine. My question is, how can I print the selected date range on the report header?

I know I can re-design the query with parameters that the user must enter at the prompt and then let these parameter prompts be the control source for the text boxes on the report. But is there any way to use the information directly from the form? In general, how do you get information from an unbound text box into the report?

Thanks for your help.
 
Old May 3rd, 2004, 11:41 PM
Registered User
 
Join Date: May 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zubairkhan
Default

Try This

CrystalReport1.Formula(0) = "FormulaName = Format(StartDate,"dd/mm/yy")
CrystalReport1.Formula(1) = "FormulaName = Format(EndDate,"dd/mm/yy")


Zubair Khan






Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Criteria for Report MArgente Access 10 June 8th, 2007 12:30 PM
Selection criteria on index form - p422 kota BOOK: Access 2003 VBA Programmer's Reference 7 October 10th, 2006 11:39 PM
Multiple criteria for a Report stealthdevil Access VBA 33 June 8th, 2006 10:38 AM
selection criteria... dbrook007 Other Programming Languages 0 February 21st, 2006 04:41 PM
Report Heading Based On Selection Criteria Fo CloudNine Access 5 March 4th, 2004 08:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.