Connecting Tech Pros Worldwide Help | Site Map

Form-Query-Report

  #1  
Old November 13th, 2005, 09:29 AM
Andy
Guest
 
Posts: n/a
Hopefully an easy one?

Have created a Form with numerous ComboBoxes.
On hitting OK on the form this calls up a Query which has all the criteria
"links" to my Form. All works OK.
How do I call up a Report (which looks better)that is displayed on the
screen or that can be printed.

Andy


  #2  
Old November 13th, 2005, 09:29 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a

re: Form-Query-Report



Andy wrote:[color=blue]
> Hopefully an easy one?
>
> Have created a Form with numerous ComboBoxes.
> On hitting OK on the form this calls up a Query which has all the[/color]
criteria[color=blue]
> "links" to my Form. All works OK.
> How do I call up a Report (which looks better)that is displayed on[/color]
the[color=blue]
> screen or that can be printed.
>
> Andy[/color]

Umm... yeah. The help file is your friend. If not, introduce
yourself.

One example...
Private Sub cmdOpenTransactionReport_Click()
On Error GoTo Err_cmdOpenTransactionReport_Click

Dim stDocName As String
Dim strCriteria As String

stDocName = "rptTransaction"

'build your filter here...
strCriteria = "TransDate=#" & Me.TransDate & "#"
'open filtered report with criteria string
DoCmd.OpenReport stDocName, acPreview, , strCriteria

Exit_cmdOpenTransactionReport_Click:
Exit Sub

Err_cmdOpenTransactionReport_Click:
MsgBox Err.Description
Resume Exit_cmdOpenTransactionReport_Click

End Sub

Note, the wizard will do most of this for you. All you need to do is
build the valid WHERE clause yourself and modify the OpenReport
statement.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any good Form Resizing code? Jozef answers 11 November 13th, 2005 03:28 PM
Strategy for form instantiation: is it a good idea? Raposa Velha answers 19 November 13th, 2005 06:43 AM
Calculations in form with missing vars Targa answers 4 July 23rd, 2005 12:22 PM
The semantic meaning of HTML form (elements) Richard Cornford answers 5 July 20th, 2005 06:39 PM
Perl - Form handler John answers 3 July 19th, 2005 06:10 AM