Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:日期在Label里显示错误,这是为什么?

1楼
hongye 发表于:2025/2/7 11:55:00
If Tables("订单查询_订单表").Current("合同交期") <> "" Then
    Dim Lab As WinForm.Label
    Lab = Forms("订单明细查询").CreateControl("合同交期", ControlTypeEnum.Label)
    Lab.AutoSize = False
    Lab.Height = 21
    Lab.Width = 132
    Lab.Left = 5
    Lab.Top = 210
    Lab.BorderColor = Color.Black
    Lab.BackColor = Color.White
    Lab.Font = New Font("微软雅黑", 9)
    Lab.TextAlign = ContentAlignment.MiddleLeft
    Lab.BorderStyle = BorderStyle.FixedSingle
    Forms("订单明细查询").Controls("SplitContainer2").Panel2.AddControl(Lab)
    Lab.Text = Tables("订单查询_订单表").Current("合同交期")
End If

.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2025.1.3.1
错误所在事件:订单查询_订单表,DoubleClick
详细错误信息:
从字符串“”到类型“Date”的转换无效。

2楼
有点蓝 发表于:2025/2/7 13:33:00
空值判断使用isnull:http://www.foxtable.com/webhelp/topics/0595.htm

If Tables("订单查询_订单表").Current.isnull("合同交期") =false Then
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.