Robert,
>Hi Kevin. I have multiple comboboxes that work fine. There's nothing going on with the relationship. When I delete the relationship a 0 is saved as the foreign key instead of the "Real" value of the foriegn key.
>
>When I step through the code I noticed that
>
>_TRRequestFK = 4
>TRRequestFK = 4
>As expected
>
>And
>
>_StatusTypeFK = 0
>StatusTypeFK = 3 (Example FK)
>
>Seems like it's trying to save the value of _StatusTypeFK to the database instead of the StatusTypeFK value.
>
>If I assign TRRequestFK = 4 before I save the business object it will save that value back to the database when I call the save.
Do you mean StatusTypeFK = 4? The underlying private variable is what *should* be stored. That's because the property retrieves the value from this private variable when you access the property. It's really a question of how/when that private variable is getting set to zero. I recommend checking your code to see if there are any references to _StatusTypeFK that might be setting the value to zero. Alternately, you can set a breakpoint on the private variable and set a condition so execution breaks when the value changes.
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com