UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Using filters on a split form to limit report data.    
 
   
stephenAA5
post Apr 30 2010, 03:24 PM
Post #1

UtterAccess Member
Posts: 49



Hi. I appreciate all the help I can get, as I've gotten things running well, and have completely hit the wall on this one.

I have two tables, Customers and Jobs. There is a JobQuery that combines both for viewing on a split form DispatchForm.

DispatchForm shows the currently highlighted job in great detail at the top of the screen, while having the datasheet view below the rail show various pieces of data upon which a user might filter information. The filtering works fine, now we need output.

I would like to have those filters that are selected be applied to a report, so they can get output. Currently, we go to a report filtering screen, which is not pretty.

I have tried to create a button that essentially has the following procedure:

Private Sub cmdOpenReport_Click()
DoCmd.OpenReport "rptDISPATCH", acViewPreview, , Me.Filter
End Sub

What happens is that the report launches, but I get an error that the query is looking for whatever data the user has selected as a filter. Clearly I'm conceptually wrong.

Thoughts?

Thank you,

Stephen.
Go to the top of the page
 
+
Brunn
post Apr 30 2010, 06:50 PM
Post #2

UtterAccess Addict
Posts: 135
From: Mpls, MN



In the OnOpen event of the report try using this (air code here but its close):

Me.Filter = Forms!Yourform!Reportwhere
Me.FilterOn = True

Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 20th May 2013 - 08:41 PM

Tag cloud: