Rss & SiteMap

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

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

标题:窗口代码

1楼
wqc360 发表于:2010/10/7 17:20:00

我在窗口AfterLoad中加入代码:

e.Form.Controls("日期").Value = Today

可以正常显示

当时我改成如下:

Dim dd As WinForm.ComboBox = e.Form.Controls("工序班组")
Dim d11 As Date = DataTables("日报表").Compute("Max(日期)")
If dd IsNot Nothing Then
    Dim d1 As Date = DataTables("日报表").Compute("Max(日期)", "[工序_班组] = '" & dd.Text & "'  ")
    e.Form.Controls("日期").Value = d1
Else
    e.Form.Controls("日期").Value = d11
End If

却显示0001-01-01

不知问题出在哪里,谢谢

 

 

2楼
czy 发表于:2010/10/7 18:39:00

这样?

 

Dim dd As String = e.Form.Controls("工序班组").Value
If dd IsNot Nothing Then
    e.Form.Controls("日期").Value = DataTables("日报表").Compute("Max(日期)", "[工序_班组] = '" & dd & "'")
Else
    e.Form.Controls("日期").Value = DataTables("日报表").Compute("Max(日期)")
End If

3楼
mr725 发表于:2010/10/8 8:41:00
却显示0001-01-01  :::      说明日期的内容为空值
4楼
wqc360 发表于:2010/10/8 14:15:00
谢谢C版,搞定
共4 条记录, 每页显示 10 条, 页签: [1]

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

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