Troubles with a report criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
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
 
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*' "
 
Back
Top