Dim Filter As String
With e.Form.Controls("订单号")
If .Text > ""Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "订单号 = '" & .Text & "'"
End If
End With
e.Form.Controls("退货数据表").Table.Filter = filter
e.Form.Controls("已退数据表").Table.Filter = filter
e.Form.Controls("换货数据表").Table.Filter = filter
e.Form.Controls("已发货数据表").Table.Filter = filter
e.Form.Controls("已收货数据表").Table.Filter = filter
If e.Form.Controls("退货数据表").Table.Rows.Count > 0 Then
e.form.Controls("退换货订单").SelectedIndex = 1
Else If e.Form.Controls("已退数据表").Table.Rows.Count > 0 Then
e.form.Controls("退换货订单").SelectedIndex = 1
Else If e.Form.Controls("换货数据表").Table.Rows.Count > 0 Then
e.form.Controls("退换货订单").SelectedIndex = 2
Else If e.Form.Controls("已发货数据表").Table.Rows.Count > 0 Then
e.form.Controls("退换货订单").SelectedIndex = 3
Else If e.Form.Controls("已收货数据表").Table.Rows.Count > 0 Then
e.form.Controls("退换货订单").SelectedIndex = 4
End If
此主题相关图片如下:qq截图20171115160651.png