Dynamic fields

D

David French

I have a small very simple database that holds information for one of our
clerks to order comany business cards with.
There are 2 tables that hold the information one of which is a table to
supply the address of the Branch the employee works at.
The one report I created is to send to the printer as a proof.

Each card may have 3 separate phone numbers printed on it.
There are branch phone number, direct phone number, fax number, cell number,
home number....I think that's it. Everyone wants something different.
Since there are so many different combinations I'd like to have a way to
have ONLY the phone numbers that have information in them to print on the
report. Either that or a way to choose which phone numbers print on the
report...this would include its accompanying label either printing or not
printing.

Dave French
 
M

Marshall Barton

David said:
I have a small very simple database that holds information for one of our
clerks to order comany business cards with.
There are 2 tables that hold the information one of which is a table to
supply the address of the Branch the employee works at.
The one report I created is to send to the printer as a proof.

Each card may have 3 separate phone numbers printed on it.
There are branch phone number, direct phone number, fax number, cell number,
home number....I think that's it. Everyone wants something different.
Since there are so many different combinations I'd like to have a way to
have ONLY the phone numbers that have information in them to print on the
report. Either that or a way to choose which phone numbers print on the
report...this would include its accompanying label either printing or not
printing.


You can use a single text box in the report to display the
phone numbers and not use any space for the null entries.
By utilizing the difference between the & and +
concatenation operators, the expression can be shortened to
something like:

=("Branch: " + BranchPhone + Chr(13) + Chr(10)) & ("Direct:
" + DirectPhone + Chr(13) + Chr(10)) & ("Fax: " + FaxPhone +
Chr(13) + Chr(10)) & . . .

The question of selecting which phone numbers to display in
the report requires a field in the table to indicate which
ones have been selected. This one can't be shortened:

=IIf(ShowBranch, "Branch: " + BranchPhone + Chr(13) +
Chr(10), "") & IIf(ShowDirect, ("Direct: " + DirectPhone +
Chr(13) + Chr(10), "") & IIf(ShowFax, "Fax: " + FaxPhone +
Chr(13) + Chr(10), "") & . . .
 

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