dim i as integer dim namestr as string for i = 0 to dataset_system.tables("company").columns.count - 1 namestr = "" namestr = "txt_company_" & dataset_system.tables("company").columns.item(i).caption dim t as type = me.gettype dim f as fieldinfo = t.getfield("_" & namestr, bindingflags.nonpublic or bindingflags.instance or bindingflags.public) if dataset_system.tables("company").columns.item(i).caption = "国际社" then dim mycontrol as checkbox = ctype(f.getvalue(me), checkbox) mycontrol.enabled = chg else dim mycontrol as textbox = ctype(f.getvalue(me), textbox) mycontrol.enabled = chg end if next