How to use switch function in Ms Access query

Hi, I am coding an ms access database solution for an aluminum fabrication company that needs to calculate aluminum profile for a project based on a measurement that is put in the field [Frame H] and it has to kinds of profiles called "DO" and "BO" respectively and they use 4 and 6.1 for calculating but I have like 30 conditions and Values to evaluate and when I use switch function in my query it brings a problem stating that" The string returned by the builder was too long. The result will be truncated".
So here is the list of code that I use...

Shutter H: Switch([ProfID]="DO",
[TypeID]="ITM001",[Frame H]-4,
[TypeID]="ITM002",[Frame H]-4,
[TypeID]="ITM003",[Frame H]-30-4,
[TypeID]="ITM004",[Frame H]-30-4,
[TypeID]="ITM005",[Frame H]-4-50,
[TypeID]="ITM006",[Frame H]-4-50,
[TypeID]="ITM007",[Frame H]-30-4-50,
[TypeID]="ITM008",[Frame H]-30-4-50,
[TypeID]="ITM009",[Frame H]-4,
[TypeID]="ITM010",[Frame H]-30-4,
[TypeID]="ITM011",[Frame H]-4,
[TypeID]="ITM012",[Frame H]-30-4,
[TypeID]="ITM013",[Frame H]-4,
[TypeID]="ITM014",[Frame H]-4),
[TypeID]="ITM001",[Frame H]-6.1,
[TypeID]="ITM002",[Frame H]-6.1,
[TypeID]="ITM003",[Frame H]-30-6.1,
[TypeID]="ITM004",[Frame H]-30-6.1,
[TypeID]="ITM005",[Frame H]-6.1-50,
[TypeID]="ITM006",[Frame H]-6.1-50,
[TypeID]="ITM007",[Frame H]-30-6.1-50,
[TypeID]="ITM008",[Frame H]-30-6.1-50,
[TypeID]="ITM009",[Frame H]-6.1,
[TypeID]="ITM010",[Frame H]-30-6.1,
[TypeID]="ITM011",[Frame H]-6.1,
[TypeID]="ITM012",[Frame H]-30-6.1,
[TypeID]="ITM013",[Frame H]-6.1,
[TypeID]="ITM014",[Frame H]-6.1),)

Thanks for your help.
Misghina TekleAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can use separate table and for each TypeID and ProfID add record with necessary value, then use value from this table in query.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Misghina TekleAuthor Commented:
Dear sir/madam can you give me a hint ...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.