Savvoulidis said:
I mean that when I call the function to pass the FK,
I use sth like : FuncName( parm )
where parm = """042514213"""
and not parm= "042514213"
Let's try to leave your function out of this and deal with
the DefaultValue property by itself. The first thing to
remember is that the DefaultValue property is a string
valued property so if you only use:
ctl.DefaultValue = "01"
then when the 01 is used in the control's Value it looks
like the number 01 and the leading zero is not relevant.
In order to tell the control that the Value is a string, it
has to have the quotes around it so you would assign it this
way:
ctl.DefaultValue = """01"""
then the control's Value would receive "01" and it would
know it is a text value.
This really is confusing, but the bottom line is that it's
not a workaround and you've done it the right way.