Dim sqr As String,sqlx As String,cgdj As String,jhrq As String,ddh As String,yt As String,sqr As String
sqr = e.Form.Controls("申请人1").Text
sqlx = e.Form.Controls("申请类型1").Text
cgdj = e.Form.Controls("采购等级1").Text
jhrq = e.Form.Controls("交货日期1").Text
ddh = e.Form.Controls("销售订单号1").Text
yt = e.Form.Controls("用途").Text
sqr = e.Form.Controls("需审核人1").Text
'其中定义变量类型需要根据字段类型来定义,如交货日期是date类型.
For i As Integer = 1 To 5
Dim nr = Tables("采购申请单_采购申请明细").AddNew()
nr("申请人") = sqr
nr("申请类型") = sqlx
nr("采购等级") = cgdj
nr("要求交货日期") = jhrq
nr("销售订单号") = ddh
nr("用途") = yt
nr("需审核人") = sqr
Next