|
-
May 11th, 2005, 02:18 PM
#1
Thread Starter
Member
Filtering results from a table
Hey,
Have a slight problem, im trying to filter things from a table to be put onto a report. I can't think of a way to do it, ive looked around and cant see anything..
any ideas?
Thanks
I reject your reality and substitute my own.
-
May 11th, 2005, 02:21 PM
#2
Addicted Member
Re: Filtering results from a table
is this Access?
if so, create a query that does all of the filtering for you, and base your report on that.
or if you want to base your report on the table you can use the filter criteria of the openReport method:
VB Code:
DoCmd.OpenReport "MyReport",acviewPreview,,"[Filter Field] = 'Filter Criteria'"
HTH
if you fail to plan, you plan to fail
-
May 11th, 2005, 02:33 PM
#3
Thread Starter
Member
Re: Filtering results from a table
Itn is access
this is a restaurant ordering system, and the orders are linked by table numbers. I am trying to bring up all entries from said table that have the same table number, selecting the number from a combo box. I couldnt figure out how to do this with a query.
I reject your reality and substitute my own.
-
May 11th, 2005, 02:41 PM
#4
Addicted Member
Re: Filtering results from a table
yeh, wouldnt bother with the query.
use this for the After Update of hte combo box:
VB Code:
Private Sub cboMyCombo_AfterUpdate()
DoCmd.OpenReport "Report Name",acViewPreview,,"[Table Number]=Forms!frmMyForm!cboMyCombo"
end sub
this opens a report called 'Report Name' in preview mode , where the field 'Table Number' equals the value in the combo box cboMyCombo
if you fail to plan, you plan to fail
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|