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

  • Thread starter Thread starter Julian Allsopp
  • Start date Start date
J

Julian Allsopp

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.
 
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],"")
 
fredg said:
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],"")


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

Cheers!
 
Back
Top