Setting up a select case statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I have a field called Donor Type. A donor type can be, Individual,
Foundation, Organization or Annonymous.

What I was doing was using an if, else statement. I thought however, a
select case statement would be more efficient. Is this the case?

What I want to do is if the donor type is Individual, then the Organization
Name field is disabled. If donor type is organization, then first name and
last name is disabled, and so on.

Question1: SHould I use a select case statement?
Question2: How would I set this up?

Many Kind regards,
Carlee
 
First, I am going to assume you really mean controls on a form. Forms don't
have fields, Tables have fields, Forms have controls. Also, never put spaces
in names of anything. It causes problems.

Select Case Me.DonorType
Case is = "Individual"
Me.Organization.Enabled = False
Me.LastName.Enabled = True
Me.FirstName.Enabled = True
Case is = "Foundation"
Case is = "Organization"
Me.LastName.Enabled = False
Me.FirstName.Enabled = False
Me.Organization.Enabled = True
Case is = "Annonymous"
End Select
 
Back
Top