472,779 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

Filter a report based on same filter on a form

Hi,

I have a form based on a table. When I filter the form I want to run a
report based on the same table with the same filter as the form. No problem
until I want to filter a combo box where the text value is on a different
table. The me.filter is then a text instead of the id-number from the lookup
table. This causes the report to prompt for the parameter.

How do I get by this problem? Do I need to create a temporary table? I
rather not. or is there another solution without using filter?
Appreciate any help
Richard
Nov 12 '05 #1
3 6531
Sounds like the combo's bound column is zero width?

You should still be able to use the value from the invisible column in the
WhereCondition for your OpenReport. Just use the Value of the combo.

It is also possible to use its Column() property if necessary. (That's
zero-based.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Richard" <rw**********@chello.se> wrote in message
news:dMQpb.883$%W3.1336@amstwist00...

I have a form based on a table. When I filter the form I want to run a
report based on the same table with the same filter as the form. No problem until I want to filter a combo box where the text value is on a different
table. The me.filter is then a text instead of the id-number from the lookup table. This causes the report to prompt for the parameter.

How do I get by this problem? Do I need to create a temporary table? I
rather not. or is there another solution without using filter?

Nov 12 '05 #2
Yes, that is true. But what I want to do is to use the filter the user sets
in the form, to the report.
For instance. If the user only wants to list clients from the State CA he
filters the form and the property me.filter sets to ((tblClients.State =
"CA")). That filter is then used to the report. Everything is working fine
until the user filters that combo. The values are taken from a lookup table
and the me.filter is set to: ((lookup_cboRemarks.remark = "Valid member")).
The lookup table is called tlkpRemarks and when I try to run the report it
asks for the parameter value of lookup_cboRemarks.remark.

The combo's bound column is zero width like you predicted and the second
column is all the remarks. I don't really want to alter the filter but if I
need to it gets messy because the filter string can get long and
complicated.

I am using Access 2002.
Appreciate any further help
Richard Wernerhjelm
"Allen Browne" <al*********@SeeSig.invalid> skrev i meddelandet
news:3f**********************@freenews.iinet.net.a u...
Sounds like the combo's bound column is zero width?

You should still be able to use the value from the invisible column in the
WhereCondition for your OpenReport. Just use the Value of the combo.

It is also possible to use its Column() property if necessary. (That's
zero-based.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Richard" <rw**********@chello.se> wrote in message
news:dMQpb.883$%W3.1336@amstwist00...

I have a form based on a table. When I filter the form I want to run a
report based on the same table with the same filter as the form. No

problem
until I want to filter a combo box where the text value is on a different table. The me.filter is then a text instead of the id-number from the

lookup
table. This causes the report to prompt for the parameter.

How do I get by this problem? Do I need to create a temporary table? I
rather not. or is there another solution without using filter?


Nov 12 '05 #3
So your request is that the report can interpret a filter containing:
lookup_cboRemarks.remark = "some text"

I'm not sure how the filter is being set: filter by form perhaps? Would it
be practical to include the combo's lookup table in the RecordSource of the
form (using an outer join query), so the filter could become:
SomeTable.remark = "some text"
The report would then be able to filter that correctly (assuming it is also
based on a query that contains the lookup table).

If that can't be done, it may be easier to change the way the filter string
is being generated so that it contains the value from the bound column. The
report would interpret that correctly. Typically I include unbound boxes in
the form header for the fields that user is likely to need to filter on, and
build the filter string programmatically. This has the advantage that it
works with mde files and runtimes where the filter-by-form is not available.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Richard" <rw**********@chello.se> wrote in message
news:ec3qb.988$%W3.1576@amstwist00...
Yes, that is true. But what I want to do is to use the filter the user sets in the form, to the report.
For instance. If the user only wants to list clients from the State CA he
filters the form and the property me.filter sets to ((tblClients.State =
"CA")). That filter is then used to the report. Everything is working fine
until the user filters that combo. The values are taken from a lookup table and the me.filter is set to: ((lookup_cboRemarks.remark = "Valid member")). The lookup table is called tlkpRemarks and when I try to run the report it
asks for the parameter value of lookup_cboRemarks.remark.

The combo's bound column is zero width like you predicted and the second
column is all the remarks. I don't really want to alter the filter but if I need to it gets messy because the filter string can get long and
complicated.

I am using Access 2002.
Appreciate any further help
Richard Wernerhjelm
"Allen Browne" <al*********@SeeSig.invalid> skrev i meddelandet
news:3f**********************@freenews.iinet.net.a u...
Sounds like the combo's bound column is zero width?

You should still be able to use the value from the invisible column in the
WhereCondition for your OpenReport. Just use the Value of the combo.

It is also possible to use its Column() property if necessary. (That's
zero-based.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Richard" <rw**********@chello.se> wrote in message
news:dMQpb.883$%W3.1336@amstwist00...

I have a form based on a table. When I filter the form I want to run a
report based on the same table with the same filter as the form. No

problem
until I want to filter a combo box where the text value is on a

different table. The me.filter is then a text instead of the id-number from the

lookup
table. This causes the report to prompt for the parameter.

How do I get by this problem? Do I need to create a temporary table? I
rather not. or is there another solution without using filter?

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CSDunn | last post by:
Hello, I have a problem with field filtering between an Access 2000 Project form (the application is called CELDT), and the report that shows the results of the filter. Both the form and the...
4
by: Nhmiller | last post by:
This is directly from Access' Help: "About designing a query When you open a query in Design view, or open a form, report, or datasheet and show the Advanced Filter/Sort window (Advanced...
1
by: lorirobn | last post by:
Hi, I have a report that works just fine. Now I would like to add the capability to choose selection criteria to limit what is displayed. I created several reports that do this, but they used...
1
by: mpmason14 | last post by:
how can i create the title for my report based on the filtered criteria in a form? the form opens the report and i want the report to have the title of what was filtered. the user can filter among...
0
by: Josetta | last post by:
This is for informational purposes...I had a problem and I thought it might help others in a similar situation. I hope someone, someday, finds this idea useful. I've garnered so much knowledge...
3
by: emgallagher | last post by:
I have a form which lists studies. People can filter the form based on details about the study, such as the study type. Currently users filter via the right click method. I would like to be...
5
by: Whasigga | last post by:
Hi guys I've got a report that I have created. It is based off of a query that I made. I use it to show different combinations of data, but its the same type of information... It is called...
5
by: DAHMB | last post by:
Hi all, Using Access 2007 I have a report called Sunday School Attendance based on a Query called qryAttendance the query is as follows: SELECT tblSundaySchoolAttendance.StudentID,...
3
by: franc sutherland | last post by:
Hello, I have a report which I filter using the me.filter command in the OnOpen event. Me.Filter = "OrderID=" & Forms!variable_form_name! Me.FilterOn = True I want to be able to open that...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.