Troubles with a report criteria

R

Ryis

Hello,
I would like to be able to only display data in a report where only part of
a field matches my criteria. I have been trying to use this [INLET SIZE]
Like "*RF*". I would like only the inlet size field to show if it contains
RF.

Any help would be appreciated

Thanks in advance

Ryan
 
R

Ryis

I get an error message. I have all the recods show up biut they just say
error# I removed the extra [ out as well. I am using access 2002

Klatuu said:
Try
IIf(Instr([[INLET SIZE], "RF") = 0 , Null, [INLET SIZE])

--
Dave Hargis, Microsoft Access MVP


Ryis said:
Hello,
I would like to be able to only display data in a report where only part of
a field matches my criteria. I have been trying to use this [INLET SIZE]
Like "*RF*". I would like only the inlet size field to show if it contains
RF.

Any help would be appreciated

Thanks in advance

Ryan
 
K

Klatuu

Where is this code? is it in the control source of a text box on the report
or is it in the query that is the record source of the report?
--
Dave Hargis, Microsoft Access MVP


Ryis said:
I get an error message. I have all the recods show up biut they just say
error# I removed the extra [ out as well. I am using access 2002

Klatuu said:
Try
IIf(Instr([[INLET SIZE], "RF") = 0 , Null, [INLET SIZE])

--
Dave Hargis, Microsoft Access MVP


Ryis said:
Hello,
I would like to be able to only display data in a report where only part of
a field matches my criteria. I have been trying to use this [INLET SIZE]
Like "*RF*". I would like only the inlet size field to show if it contains
RF.

Any help would be appreciated

Thanks in advance

Ryan
 
R

Ryis

Thank you it worked, I just had to be smarter and use the string in the
proper place

Thanks

Ryan

Klatuu said:
Try
IIf(Instr([[INLET SIZE], "RF") = 0 , Null, [INLET SIZE])

--
Dave Hargis, Microsoft Access MVP


Ryis said:
Hello,
I would like to be able to only display data in a report where only part of
a field matches my criteria. I have been trying to use this [INLET SIZE]
Like "*RF*". I would like only the inlet size field to show if it contains
RF.

Any help would be appreciated

Thanks in advance

Ryan
 
M

Marshall Barton

Ryis said:
I would like to be able to only display data in a report where only part of
a field matches my criteria. I have been trying to use this [INLET SIZE]
Like "*RF*". I would like only the inlet size field to show if it contains
RF.


You could use Like "*RF*" as the criteria in the report's
record source query, but a cleaner way is to use a form to
open the report. The form would need a command button with
a Click event procedure something like:

DoCmd.OpenReport "report", , , "[INLET SIZE] Like '*RF*' "
 

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