| Joseph Balla 2005-01-23, 9:04 pm |
|
need to reduce these calls to one
the only way I can do that is if I can repalce all of the if
statement with one
the way I was thinking is if there is a way to pass then
ColType(rr) to the cbx. controll
ie: cbx.Get {Colype(rr)} FieldbyName(h, ColName(rr), 0,
rcode)
the code listed belove I guess might give an idea of what the current code
is doing but I would like o lessen the process
any help would be nice...
If ColType(rr) = "string" Then gdf =
cbx.GetStringFieldbyName(h, ColName(rr), 0, rcode)
If ColType(rr) = "char" Then gdf = cbx.GetCharFieldbyName(h,
ColName(rr), 0, rcode)
If ColType(rr) = "integer" Then gdf =
cbx.GetIntegerFieldbyName(h, ColName(rr), 0, rcode)
If ColType(rr) = "long" Then gdf = cbx.GetLongFieldbyName(h,
ColName(rr), 0, rcode)
If ColType(rr) = "real" Then gdf = cbx.GetRealFieldbyName(h,
ColName(rr), 0, rcode)
If ColType(rr) = "money" Then gdf =
cbx.GetMoneyFieldbyName(h, ColName(rr), 0, rcode)
If ColType(rr) = "date" Then gdf = cbx.GetDateFieldbyName(h,
ColName(rr), 0, rcode)
If ColType(rr) = "time" Then gdf = cbx.GetTimeFieldbyName(h,
ColName(rr), 0, rcode)
If ColType(rr) = "boolean" Then gdf =
cbx.GetBooleanFieldbyName(h, ColName(rr), 0, rcode)
thnx...
|