Infopath 2007 Programming code behind, FormEvents_Loading

I am trying to disable a button, if a user opens a form.  The button is an approval button and it can only be enabled if the Manager opens the form. So I have a field that contains Username() to a field with a default value that gets populated when the user click insert on the Manager information.  This fields default is the FirstName.Lastname of manager.  I want to compare the Username() to this and if it matches enable the approve button, and do this on the formload.  I have tried a bunch of different things and cannot get this to work.

 I have not used coding in years and I am very rusty, and the knowledge I have is limited with C#.  So any help would be appreciated.
Who is Participating?
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.

daniberesAuthor Commented:
I am closing this I figured it out myself, just added this comparison in and placed in an if statement to only run if Mgr Name is not null.

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
.NET Programming

From novice to tech pro — start learning today.