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 1, 2
   Home -> Office other -> General Discussions RSS
Next:  Moving to other backend  
Author Message
beth

External


Since: Aug 11, 2006
Posts: 20



(Msg. 1) Posted: Mon Oct 06, 2008 9:42 am
Post subject: Report expression
Archived from groups: microsoft>public>access (more info?)

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
Jerry Whittle

External


Since: Mar 03, 2006
Posts: 1988



(Msg. 2) Posted: Mon Oct 06, 2008 9:56 am
Post subject: RE: Report expression [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
martinmike2

External


Since: Jul 02, 2008
Posts: 139



(Msg. 3) Posted: Mon Oct 06, 2008 10:01 am
Post subject: Re: Report expression [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Oct 6, 12:42 pm, beth <b... DeleteThis @discussions.microsoft.com> 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?

beth, you could try IIF statements. But I would advise creating a
seperate table:

CODE:
BM
BE
HM
HE

TYPE:
Business E-Mail
Business Mail
etc
etc

and setting the relationship as one to many. You can then include the
new table into your query and display the "translated" code on the
report.

Otherwise you could use IIF statements.
Back to top
Login to vote
beth

External


Since: Aug 11, 2006
Posts: 20



(Msg. 4) Posted: Mon Oct 06, 2008 10:03 am
Post subject: RE: Report expression [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
martinmike2

External


Since: Jul 02, 2008
Posts: 139



(Msg. 5) Posted: Mon Oct 06, 2008 10:06 am
Post subject: Re: Report expression [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Oct 6, 12:56 pm, Jerry Whittle
<JerryWhit... RemoveThis @discussions.microsoft.com> 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?- Hide quoted text -
>
> - Show quoted text -

Thanks for backing me up Jerry, lol.
Back to top
Login to vote
beth

External


Since: Aug 11, 2006
Posts: 20



(Msg. 6) Posted: Mon Oct 06, 2008 10:08 am
Post subject: Re: Report expression [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm still a rookie at If statements. Could you write one for me, then I could
follow the format?

"martinmike2" wrote:

> On Oct 6, 12:42 pm, beth <b... RemoveThis @discussions.microsoft.com> 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?
>
> beth, you could try IIF statements. But I would advise creating a
> seperate table:
>
> CODE:
> BM
> BE
> HM
> HE
>
> TYPE:
> Business E-Mail
> Business Mail
> etc
> etc
>
> and setting the relationship as one to many. You can then include the
> new table into your query and display the "translated" code on the
> report.
>
> Otherwise you could use IIF statements.
>
Back to top
Login to vote
Jerry Whittle

External


Since: Mar 03, 2006
Posts: 1988



(Msg. 7) Posted: Mon Oct 06, 2008 10:33 am
Post subject: RE: Report expression [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
beth

External


Since: Aug 11, 2006
Posts: 20



(Msg. 8) Posted: Mon Oct 06, 2008 10:41 am
Post subject: RE: Report expression [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 1, 2
Page 1 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