Filter During "On Click" Event

H

HollyH

I have a command button opening a report called "reference
number summary".

I need it to filter for an entered period (period is XXXX-X
with the first four numerals being the period and the last
numeral being the week number in the period) and for the
company name not equaling "MEI-C".

The first one will need to be a like statement and the
second a <> statement, but I keep getting type mismatches
and know I am getting my " in the wrong place. Both fields
are text.

This is what I started with:
"[WEEK]" Like "([Enter Period Number] & " * ")"

I haven't yet added the:
And ("[CompanyN]" <> "MEI-C")

I need some help to get this working smoothly.
Thanks
 
G

GVaught

Create a query and use this query against your report. In the criteria
section for Company Name type: <> "MEI-C" . On the same line but under the
Period field's criteria area type: Like [Enter Period] & "*". Then when your
users execute the command button on the form, it will give them the report
they need with the period they need.
If they just press enter, they will get all periods where the Company name
is not equal to MEI-C.
 
H

HollyH

The problem is that I need to open this report in several
configurations. I have one where it opens based on the
reference number that is entered and includes all of the
data for all of the associated periods. I will have one
that I described below that will print a batch by period
excluding MEI-C. I will have one that includes only MEI-C
in the batch. Lastly I will have one that is by reference
number for an individual period.

I decided that one report with the filter criteria in the
buttons would be the best option. I didn't want to create
a separate report for each option.

Holly H

-----Original Message-----
Create a query and use this query against your report. In the criteria
section for Company Name type: <> "MEI-C" . On the same line but under the
Period field's criteria area type: Like [Enter Period] & "*". Then when your
users execute the command button on the form, it will give them the report
they need with the period they need.
If they just press enter, they will get all periods where the Company name
is not equal to MEI-C.
--
G Vaught

HollyH said:
I have a command button opening a report called "reference
number summary".

I need it to filter for an entered period (period is XXXX-X
with the first four numerals being the period and the last
numeral being the week number in the period) and for the
company name not equaling "MEI-C".

The first one will need to be a like statement and the
second a <> statement, but I keep getting type mismatches
and know I am getting my " in the wrong place. Both fields
are text.

This is what I started with:
"[WEEK]" Like "([Enter Period Number] & " * ")"

I haven't yet added the:
And ("[CompanyN]" <> "MEI-C")

I need some help to get this working smoothly.
Thanks


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top