I wonder if you can throw a bit of light into this problem which I believe has something to do with custom fields in a BO. I have the following error in business object "boPUN_New" when I open up the form in the IDE that contains the BO. I can close the form and generally mess around until the form opens and I can see it the designer. boPUN_New is the datasource in a grid and I can see all the fields except my custom fields. I've used custom fields before so I have a template to follow and, as best as I can see, I've created them in this BO in the same manner as I've created them in other BO's. I've been messing around with this all day now and I'm getting no where - hopefully you can offer an insight that will help me make some progress...
TIA - Peter
Thanks for the prompt feedback and information - I will await your further comments.
Greg - well spotted - a "copy and paste" typo I'm afraid but fixing it didn't change anything.
A comment I should have made in my original post is that in your sample code Trent the GetType funtion doesn't have a value, e.g.
however, if I leave it empty in my code, I get an error in the IDE of "Type expected".
Cheers, Peter
"GetType" is both a keyword and a method of System.Object (at least it is in VB.NET... in C#, the keyword is typeof). So, if you leave the value out of the parentheses in an instance method, the compiler is supposed to pick up on that fact and consider it to be Me.GetType() (which is the System.Object.GetType() call) which returns the type of the current object. If you place a value in there, it's supposed to consider it to be the keyword call and pull the type that you placed in the parentheses.
But if the GetType is blue (the keyword color), then you know it's expecting the value to be placed in the parentheses like "GetType(MyBo)". Otherwise, just put a Me. in front of it like this: Me.GetType() to force it to use the current object for the method call.