Forms/Reports Select Case Statement equivalent

  • Thread starter epoh97 via AccessMonster.com
  • Start date
E

epoh97 via AccessMonster.com

Hi all:

Is there a Select Case Statement equivalent in Access Forms & Reports that
allows you to allow specify mulitple conditions instead of using IIf?
 
H

HiTechCoach via AccessMonster.com

You can use the VBA "Select Case Statement" anywhere you can write VBA code
which includes Forms andReports. I use it a lot.

If you will desribe what you are trying to do, we can help you find a
solution.


Hi all:

Is there a Select Case Statement equivalent in Access Forms & Reports that
allows you to allow specify mulitple conditions instead of using IIf?

--
Boyd
Hi Tech Coach
http://www.hitechcoach.com

Message posted via AccessMonster.com
 
E

epoh97 via AccessMonster.com

During data entry:

The user selects a combo box to specify the relationship of a new member with
an existing member.

Whether the member is a Friend(1), Family(2), Referal(3) or Work(4)
relationship to an existing member. They then choose the current member to
whom the new member is related to.

ComboBox is called Relationship, ComboBox for Members is called CurrMems.

In the report I want to be able to specify how each new member is referred to
the club.

Select Case Relationship
Case Relationship = 1
" is a friend of " & [CurrMems]
Case Relationship = 2
" is family of " & [CurrMems]
Case Relationship = 3
" was referred by " & [CurrMems]
Case Relationship = 4
" works with " & [CurrMems]
End Select

=======================================

Here is how the report should read:

John Doe joined The Club on July 17, 2006
John Doe is a friend of Jane VIP

=========================================

I hope this makes sense. Thanks
 
D

Douglas J. Steele

Try the Choose function.

=Choose([Relationship], " is a friend of ", " is family of ", " was referred
by ", " works with ") & [CurrMems]
 

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