Advertisement

05.04.2008 at 02:40AM PDT, ID: 23374695
[x]
Attachment Details

access: if statement in macro

Asked by almaha in Microsoft Access Database, Access Forms, Access Coding/Macros

this code doesn't work
i'm guessing my if statement is missing some syntax


Public Function WhatCatComIsIt(ByVal comboCommodity As String, ByVal comboCategory As String) As String
 
If comboCategory = "Update and enhance the content of materials masters" Then
If comboCommodity = "Pumps" Then WhatCatComIsIt = "11"
If comboCommodity = "Gaskets & O-Ring" Then WhatCatComIsIt = "12"
If comboCommodity = "Valves" Then WhatCatComIsIt = "13"
If comboCommodity = "Heat Transfere & Procee Equipment" Then WhatCatComIsIt = "14"
If comboCommodity = "Turbines & Compressors" Then WhatCatComIsIt = "15"
If comboCommodity = "Pipe & Pipe Fittings" Then WhatCatComIsIt = "16"
If comboCommodity = "Drilling / General" Then WhatCatComIsIt = "17"
If comboCommodity = "Chemicals" Then WhatCatComIsIt = "18"
If comboCommodity = "Enviromental" Then WhatCatComIsIt = "19"
If comboCommodity = "Other" Then WhatCatComIsIt = "110"
End If
 
If comboCategory = "Link material masters to local manufacturers" Then
If comboCommodity = "Pumps" Then WhatCatComIsIt = "21"
If comboCommodity = "Gaskets & O-Ring" Then WhatCatComIsIt = "22"
If comboCommodity = "Valves" Then WhatCatComIsIt = "23"
If comboCommodity = "Heat Transfere & Procee Equipment" Then WhatCatComIsIt = "24"
If comboCommodity = "Turbines & Compressors" Then WhatCatComIsIt = "25"
If comboCommodity = "Pipe & Pipe Fittings" Then WhatCatComIsIt = "26"
If comboCommodity = "Drilling / General" Then WhatCatComIsIt = "27"
If comboCommodity = "Chemicals" Then WhatCatComIsIt = "28"
If comboCommodity = "Enviromental" Then WhatCatComIsIt = "29"
If comboCommodity = "Other" Then WhatCatComIsIt = "210"
End If

If comboCategory = "Migrate material masters from SAP/R3 to B2B catalog" Then
If comboCommodity = "Pumps" Then WhatCatComIsIt = "31"
If comboCommodity = "Gaskets & O-Ring" Then WhatCatComIsIt = "32"
If comboCommodity = "Valves" Then WhatCatComIsIt = "33"
If comboCommodity = "Heat Transfere & Procee Equipment" Then WhatCatComIsIt = "34"
If comboCommodity = "Turbines & Compressors" Then WhatCatComIsIt = "35"
If comboCommodity = "Pipe & Pipe Fittings" Then WhatCatComIsIt = "36"
If comboCommodity = "Drilling / General" Then WhatCatComIsIt = "37"
If comboCommodity = "Chemicals" Then WhatCatComIsIt = "38"
If comboCommodity = "Enviromental" Then WhatCatComIsIt = "39"
If comboCommodity = "Other" Then WhatCatComIsIt = "310"
End If
 
 
End FunctionStart Free Trial
[+][-]05.04.2008 at 05:06AM PDT, ID: 21495456

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 05:18AM PDT, ID: 21495481

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 10:17AM PDT, ID: 21496263

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 10:19AM PDT, ID: 21496276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 01:16PM PDT, ID: 21496796

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 01:30PM PDT, ID: 21496845

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 01:36PM PDT, ID: 21496863

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 01:45PM PDT, ID: 21496876

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 02:32PM PDT, ID: 21497004

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:08PM PDT, ID: 21498361

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:12PM PDT, ID: 21498371

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:16PM PDT, ID: 21498380

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:24PM PDT, ID: 21498403

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:29PM PDT, ID: 21498408

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:29PM PDT, ID: 21498409

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:37PM PDT, ID: 21498432

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:44PM PDT, ID: 21498442

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:51PM PDT, ID: 21498459

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.05.2008 at 12:07AM PDT, ID: 21498509

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, Access Forms, Access Coding/Macros
Sign Up Now!
Solution Provided By: Thomasian
Participating Experts: 4
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628