(Msg. 9) Posted: Mon Oct 06, 2008 4:21 pm
Post subject: Re: Report expression [Login to view extended thread Info.] Archived from groups: microsoft>public>access (more info?)
I respectfull disagree with Jerry on this one. Agreed it would be better to
use a translation table, but since that is not an option, there is a much
simple alternative to a complex (I really hate them) IIf statment.
It is the Swith function. You can use a calculated control on your report
to show a different value with it. If you need additional info, look it up
in VBA Help, but it would be like this:
"beth" <beth.TakeThisOut@discussions.microsoft.com> wrote in message
news:F6F46A31-987C-4BD1-AEFF-CFEB98EB6FC4@microsoft.com...
> Yes, I'll have time to alter b4 the year's end. My databse consists of
> tables
> - base, home, business and then annual registrations. It might be easier
> b4
> the membership expands to just go back and 'replace' BM w/ business mail,
> etc.. I've been using access for 8 years now, but never to half of its
> fullest.
>
> Thanks for all of your help.
>
> "Jerry Whittle" wrote:
>
>> You could write a complex, hard to maintain IIf statement. Below will
>> get
>> you started.
>>
>> IIf([MP] = "BM", "Business Mail", IIf([MP]="BE", "Business E-Mail",
>> "Unknown"))
>>
>> However you'd be much better off doing things right the first time. If
>> you're in too much of a hurry to do it right now, will you have time to
>> fix
>> it in the future?
>> --
>> Jerry Whittle, Microsoft Access MVP
>> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>>
>>
>> "beth" wrote:
>>
>> > I'm under a little time contraint. Isn't there an expression like If
>> > [MP]=BE,
>> > print "Business E-mail"?
>> >
>> > "Jerry Whittle" wrote:
>> >
>> > > Create a new table called tblMailingPreference.
>> > >
>> > > Make a text field named MP and also make it the primary key.
>> > > Make another text field named MailingPreference.
>> > >
>> > > Populate the new table with the appropriate data. Then link the new
>> > > table to
>> > > the original by the MP fields in a query. Use the MailingPreference
>> > > field to
>> > > show the words that you wish to see.
>> > > --
>> > > Jerry Whittle, Microsoft Access MVP
>> > > Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>> > >
>> > >
>> > > "beth" wrote:
>> > >
>> > > > Field MP contains 2 alpha characters (BM, BE, HM, or HE)
>> > > > representing a
>> > > > mailing preference. I would like my report, which will become a
>> > > > renewal form,
>> > > > to print (Business E-mail, Business Mail, etc).
>> > > > Any suggestions?
All times are: Eastern Time (US & Canada) (change) Goto page Previous1, 2
Page 2 of 2
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum