if Tables("监造日志").Current isnot nothing then
Dim tv As Date = Tables("监造日志").Current("填报日期")
Dim tp As TimeSpan = Date.Today - tv
If tp.TotalDays >= 1 Then '如果订单已经超过1天
forms("监造日志窗口").controls("TextBox1").Enabled=False
fm.DeleteCommand.Visible = False
fm.ClearCommand.Visible = False
fm.AddCommand.Visible = False
Else
forms("监造日志窗口").controls("TextBox1").Enabled=True
fm.DeleteCommand.Visible = True
fm.ClearCommand.Visible = True
fm.AddCommand.Visible = True
End If
end if