contact info database...I don't want to show all info on every rec

G

Guest

Help! I built a contact info directory that's in pretty good shape but my
boss keeps changing what he wants. Now I need to be able to have a complete
record in the database but also have a printable version that omits some
different fields in each record based on the client's preferences.
Essentially, people give me their phone and email but only want their email
to be published. How can I run a query that omits info from various fields
for some records but not for others? I don't know much about code or
expressions, so keep it simple please :)
 
G

Guest

You could add flag fields associated with the data fields and then use IFF
statement in your query. If flag No_E-mail then in your query put this --
E-mail: IIF([No_E-mail ] = 0, Null, [E_mail])
OR
E-mail: IIF([No_E-mail ] = 0, "Not for publication", [E_mail])
 
G

Guest

Ok, I'm sorry but I still can't get this to work. This expression seems to
nullify the entire record, not just the specific field it's related to. Help?

KARL DEWEY said:
You could add flag fields associated with the data fields and then use IFF
statement in your query. If flag No_E-mail then in your query put this --
E-mail: IIF([No_E-mail ] = 0, Null, [E_mail])
OR
E-mail: IIF([No_E-mail ] = 0, "Not for publication", [E_mail])

s0079376 said:
Help! I built a contact info directory that's in pretty good shape but my
boss keeps changing what he wants. Now I need to be able to have a complete
record in the database but also have a printable version that omits some
different fields in each record based on the client's preferences.
Essentially, people give me their phone and email but only want their email
to be published. How can I run a query that omits info from various fields
for some records but not for others? I don't know much about code or
expressions, so keep it simple please :)
 
G

Guest

Did you add a field to your table named No_E-mail so as to flag you query.
Make it a Yes/No field. You must update all existing records.

Open your query in design view and add a new output column like this --

E-mail: IIF([No_E-mail ] = -1, Null, [E_mail])
OR
E-mail: IIF([No_E-mail ] = -1, "Not for publication", [E_mail])

This is not critera for a field but a new output or display field instead of
your E_mail field (whatever the name of your e-mail field is called).

s0079376 said:
Ok, I'm sorry but I still can't get this to work. This expression seems to
nullify the entire record, not just the specific field it's related to. Help?

KARL DEWEY said:
You could add flag fields associated with the data fields and then use IFF
statement in your query. If flag No_E-mail then in your query put this --
E-mail: IIF([No_E-mail ] = 0, Null, [E_mail])
OR
E-mail: IIF([No_E-mail ] = 0, "Not for publication", [E_mail])

s0079376 said:
Help! I built a contact info directory that's in pretty good shape but my
boss keeps changing what he wants. Now I need to be able to have a complete
record in the database but also have a printable version that omits some
different fields in each record based on the client's preferences.
Essentially, people give me their phone and email but only want their email
to be published. How can I run a query that omits info from various fields
for some records but not for others? I don't know much about code or
expressions, so keep it simple please :)
 

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