WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Report expression

 
Goto page Previous  1, 2
   Home -> Office other -> General Discussions RSS
Next:  Moving to other backend  
Author Message
Klatuu

External


Since: Sep 09, 2008
Posts: 312



(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:

=Switch([MP] = "BM", "Business Mail", [MP] = "BE", "Business E-Mail", [MP] =
"HM", "Home Mail", [MP] = "HE", "Home E-Mail")


"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?
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> General Discussions All times are: Eastern Time (US & Canada) (change)
Goto page Previous  1, 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
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET