Connecting Tech Pros Worldwide Help | Site Map

Form-Query-Report

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 08:29 AM
Andy
Guest
 
Posts: n/a
Default Form-Query-Report

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, 08:29 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a
Default 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.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.