Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

Calling segments

I need an MS Access formula for this:

If a segment number = 00000000 then segment description
else
Department description.

segment number is a txt field

Thanks
0
Kdankwah
Asked:
Kdankwah
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
IIF([segment number]="00000000", [segment description], [Department description]) as NewColumnName
0
 
pteranodon72Commented:
In a query?
Description: Iif([segment number] = '00000000', [segment description], [Department Description])

as a control source on a form:
=Iif([segment number] = '00000000', [segment description], [Department Description])

HTH,
pT72
0
 
KdankwahAuthor Commented:
Thanks for timely response.  What if the segment is a sub department of the department and I want to run reports department reports seperate from the segment reports.  I dont know if I should open another ticket for this.

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now