Switch Function Kinda Works

Teryl

New Member
Joined
Feb 26, 2002
Messages
19
Hi Guys, I'm trying to use a Switch Function, but I don't know how to end the formula. Its working (kinda of), if anyone can tell me how to end it...it probably will work great, but my knowledge of Access is limited. Here it is>

On a report in Control Source of field named UpdateStatus

=Switch([StatusID]="Completed", "Completed", [StatusID]="Cancelled","Cancelled)

Thats it...it works but if its any of the other three possibilities i.e. (On Going, On Hold, Requested) nothing shows on the report.

Your help will be greatly appreciated...Thanks again!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
What exactly are you trying to do here? What do you want to show up for the other 3 possible values? If you want them all to show as they are, why not just set the control source to StatusID?

-rh
 
Upvote 0
Switch Function

Hi Russell,
I have projects with a StatusID and then I have updates to these projects, (little projects) with their own UpdateStatus, ie (on going, requested, on hold). What I want is for if the StatusID on the main project is cancelled or completed to have this reflected in the UpdateStatus. If a project is cancelled or completed then the updatestatus can't be any of the other three options because the whole project has been completed or cancelled. If its not completed or cancelled then I want it to reflect whatever the user entered in the first place. Maybe the switch function isn't what I need, I don't know. I just dont' want a report with a cancelled or completed project to have its updates say that they are (on going, requested, or on hold). I hope this makes sense. I appreciate your help. Thanks
 
Upvote 0
Maybe you could go into more detail about the StatusID field (what values does it really hold), and about the "UpdatedStatus" - is this a field? If not, where do the values come from?
 
Upvote 0

Forum statistics

Threads
1,221,525
Messages
6,160,327
Members
451,637
Latest member
hvp2262

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top