Look here:
http://msdn.microsoft.com/en-us/libr...aultvalue.aspx
The
type of
DefaultValue is *always*
String, no matter what the data type of the actual parameter is.
So you *MUST* supply a String as the value, not a boolean or (as gbianchi suggested) an integer.
So you could do either
AccessDataSource1.InsertParameters("status").Defau ltValue = "True"
or, if your intended value is actually a variable with actual value known only at run time,
AccessDataSource1.InsertParameters("status").Defau ltValue = CType(someBooleanVariable,String)
or, since this is
VB code,
AccessDataSource1.InsertParameters("status").Defau ltValue = CStr(someBooleanVariable)
Yes, you could also use
AccessDataSource1.InsertParameters("status").Defau ltValue = "-1"
But that's only because Access, in common with
VB, returns -1 if you do CINT(True) and can, similarly, do CBOOL(-1) to produce a boolean True.
Personally, I'd be more "correct" and stick with either "True" or CTYPE(xxx,String) or CStr(xxx)