bound combobox value doesn't change

I have a combobox cboBackEnd that is bound to BackEndID in tblKeepingTrack.
When a user clicks on btnChangeBackEnd in code I have the following in code:
Me.cboBackEnd = IIf(Me.cboBackEnd(2) = "Local", 3, 2)
(In my tblBackEnds, 3 is the ID for the Server BackEnd and 2 is the ID for the Local Backend)

When I click the button, I see the value of the combobox change on the form, but when I exit and return to the form, the old value still shows up in the combobox. When I change the combo by hand, however, then the value is saved. How can I save the value when the user clicks the button?
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 don't need the button.  Base the combo on:
Values 2;"Local";3;"Server"
Bound Column 1
Number of Columns 2
Column Widths 0";0.6"

BTW something is wrong in the logic of your question.  The IIF() statement looks like it will set the combo to 3 if the second column is Local, yet the next line says 2 is Local.  Anyway, throw the button away and enter these values in the properties.  Now you will see just Local and Server in the dropdown, and when you select either, the combobox value will have the appropriate number, 2 for Local and 3 for Server.

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
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
Microsoft Access

From novice to tech pro — start learning today.