If value = true then make field = blank...

  • Thread starter Thread starter Matt P
  • Start date Start date
M

Matt P

It is pretty simple what I want the query to do, the problem is I
can't seem to figure it out... I have a field in my called called
"Company Names" and if the other field "Personal" is set to True, I do
not want to display the value contained in "Company Names" just a
blank entry. I will be needing this for a report.

Thanks for any suggestions!
 
Matt said:
It is pretty simple what I want the query to do, the problem is I
can't seem to figure it out...  I have a field in my called called
"Company Names" and if the other field "Personal" is set to True, I do
not want to display the value contained in "Company Names" just a
blank entry. I will be needing this for a report.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You should make this adjustment in the report.  All display and
formatting info is easier done on the report.  It's best to keep queries
as simple as possible for ease of maintenance.

In the report:  In the Company Names TextBox put this as the Control
Source:

   =IIf([Personal]=True,"", [Company Names])

HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup.  I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSkJq8IechKqOuFEgEQLI2ACfWlH0BQ8wwtHDt75SD4AhhSrOeZAAnR2H
hB7ZEbw4MNzbr7mPc7Jw7nlB
=G2/e
-----END PGP SIGNATURE-----

Thanks! Thats kinda what I was thinking but now my problem is that it
leaves a blank space in the address how do I just get rid of the blank
space? My formula is:

=[First Name] & " " & [Last Name] & Chr(13) & Chr(10) & (IIf([Personal]
=True,"",[Company Name])+" "+Chr(13)+Chr(10)) & [Address] & Chr(13) &
Chr(10) & [City] & " " & [State] & " " & [ZipCode]

Got any ideas?

-Matt P
 
Matt said:
Matt P wrote:
It is pretty simple what I want the query to do, the problem is I
can't seem to figure it out...  I have a field in my called called
"Company Names" and if the other field "Personal" is set to True, I do
not want to display the value contained in "Company Names" just a
blank entry. I will be needing this for a report.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You should make this adjustment in the report.  All display and
formatting info is easier done on the report.  It's best to keep queries
as simple as possible for ease of maintenance.
In the report:  In the Company Names TextBox put this as the Control
Source:
   =IIf([Personal]=True,"", [Company Names])
HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup.  I DO NOT respond to emails **
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBSkJq8IechKqOuFEgEQLI2ACfWlH0BQ8wwtHDt75SD4AhhSrOeZAAnR2H
hB7ZEbw4MNzbr7mPc7Jw7nlB
=G2/e
-----END PGP SIGNATURE-----
Thanks! Thats kinda what I was thinking but now my problem is that it
leaves a blank space in the address how do I just get rid of the blank
space?  My formula is:
=[First Name] & " " & [Last Name] & Chr(13) & Chr(10) & (IIf([Personal]
=True,"",[Company Name])+" "+Chr(13)+Chr(10)) & [Address] & Chr(13) &
Chr(10) & [City] & " " & [State] & " " & [ZipCode]
Got any ideas?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Just move the +Chr(13)+Chr(10) next to the Company Name:

IIf([Personal]=True, "", [Company Name]+Chr(13)+Chr(10)) & [Address] ....

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup.  I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSkJ3x4echKqOuFEgEQLhqACglydxCCIYqNosxaeLEJ1jUls56iEAoLuT
Uy5nnN5aACA/Dy/j60Ojdedw
=997c
-----END PGP SIGNATURE-----

Heh, thanks... at the end of the day I just start to miss
everything!

-Matt P
 
Back
Top