Tags: access, based, contains, database, depending, field, microsoft, mysql, oracle, printing, query, record, report, sql, suppress, toprint, value

How to suppress printing a value in a field depending on the value in another field.

On Database » Microsoft Access

2,088 words with 2 Comments; publish: Fri, 30 May 2008 22:22:00 GMT; (250764.65, « »)

Please can someone help.

I have a report, based on a query, in which for each record I want to

print a value in Field A only if Field B contains a specific value.

The fields are text fields and although Field A will always contain a

value, that value should only be shown on the report if the text in

Field B is, for example "Valid".

How can I achieve this. I guess it's going to need a VB procedure but

I'm not yet experienced enough in VBA to handle this.

I'm running Access 2000 on XP Professional.

With thanks in advance.

Julian Allsopp

Northampton

UK

All Comments

Leave a comment...

  • 2 Comments
    • On Sun, 14 Nov 2004 17:05:23 +0000, Julian Allsopp wrote:

      > Please can someone help.

      > I have a report, based on a query, in which for each record I want to

      > print a value in Field A only if Field B contains a specific value.

      > The fields are text fields and although Field A will always contain a

      > value, that value should only be shown on the report if the text in

      > Field B is, for example "Valid".

      > How can I achieve this. I guess it's going to need a VB procedure but

      > I'm not yet experienced enough in VBA to handle this.

      > I'm running Access 2000 on XP Professional.

      > With thanks in advance.

      No VBA required.

      In the report, add an unbound text control.

      Set it's Control Source to:

      =IIf([FieldB] = "Valid",[FieldA],"")

      Fred

      Please only reply to this newsgroup.

      I do not reply to personal email.

      #1; Fri, 30 May 2008 22:24:00 GMT
    • In message <mjrcjzfus3td$.11vijp9s484cu$.dlg.ms-access.todaysummary.com.40tude.net>, fredg

      <fgutkind.ms-access.todaysummary.com.example.invalid> writes

      >On Sun, 14 Nov 2004 17:05:23 +0000, Julian Allsopp wrote:

      >

      >No VBA required.

      >In the report, add an unbound text control.

      >Set it's Control Source to:

      >=IIf([FieldB] = "Valid",[FieldA],"")

      Thanks FredG, I'll give that a try. Simple when you know how isn't it!

      Cheers!

      Julian Allsopp

      Northampton

      UK

      #2; Fri, 30 May 2008 22:25:00 GMT