设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
楼主: boy1
打印 上一主题 下一主题

[模块/函数] 如何拆分列

[复制链接]
11#
发表于 2008-12-16 11:44:06 | 显示全部楼层
问题1  strWhere 这里是条件字符串
          等值于 DateDiff('d', Date(), 付款日期)<= " & Me.签约时间开始 & " and DateDiff('d', Date(), 付款日期)>=0
          也就是
          Me.b.Form.RecordSource = "select * from b where " & strWhere
          等值与
          Me.b.Form.RecordSource = "select * from b where DateDiff('d', Date(), 付款日期)<= " & Me.签约时间开始 & " and DateDiff('d', Date(), 付款日期)>=0"

问题2,3,4 在帮助上都写得很清楚,请按f1查看
问题5 倒数第二列的索引===rs.Fields.Count - 2
         那么就是
         Replace(rs.Fields(rs.Fields.Count - 2), ".", "-")

[ 本帖最后由 Henry D. Sy 于 2008-12-16 11:45 编辑 ]
12#
发表于 2008-12-16 17:31:47 | 显示全部楼层
dddddd

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
13#
发表于 2008-12-16 20:48:19 | 显示全部楼层
数据表的第三条记录的最后一个字段,付款日期的字段值有误,多了一小点
14#
发表于 2008-12-16 20:49:40 | 显示全部楼层
放大给你看看
09.01.25`
15#
发表于 2008-12-17 01:15:41 | 显示全部楼层
dddddd

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
16#
发表于 2008-12-17 13:47:14 | 显示全部楼层
不明白什么意思
17#
发表于 2008-12-17 15:21:11 | 显示全部楼层
你是不是更改了窗体的名字
A。 检查启动里的设置,如果设置了启动窗体,看看启动的窗体是不是你更改窗体名字前的名字。如是,更改为当前你窗体的姓名字。
B。 如果没有设置启动窗体,哪就看看,有没有一个叫Autoexec的宏,看看里面打开的是什么窗体,跟你现有的窗体名字相符与否。
18#
发表于 2008-12-17 22:14:17 | 显示全部楼层
不是查不出,而是没有符合条件的,增加60.90天的试试。
(除非你更改过查询语句)
19#
发表于 2008-12-17 22:59:03 | 显示全部楼层
知道哪里错误
更正一下:
  1. Private Sub Command12_Click()
  2.     strWhere = ""
  3.     If Not IsNull(Me.签约时间开始) Then
  4.         strWhere = strWhere & "DateDiff('d', Date(), 付款日期) <= " & Me.签约时间开始 & " and DateDiff('d', Date(), 付款日期)>=0 And "
  5.     End If
  6.     If Not IsNull(Me.txt日期) Then
  7.         Select Case Me.Combo9
  8.         Case "付款日期"
  9.             strWhere = strWhere & "Format(付款日期, 'yyyy-mm') like '*" & Format(Me.txt日期, "yyyy-mm") & "*' And "
  10.         Case Else
  11.             strWhere = strWhere & Me.Combo9 & " like '*" & Me.txt日期 & "*' And "
  12.         End Select
  13.     End If
  14.     If Len(strWhere) <> 0 Then
  15.         strWhere = Left(strWhere, Len(strWhere) - 5)
  16.     End If
  17.        Debug.Print strWhere
  18.     Me.b子窗体.Form.Filter = strWhere
  19.     Me.b子窗体.Form.FilterOn = True
  20. End Sub
复制代码
20#
发表于 2008-12-18 09:22:14 | 显示全部楼层
你要输入,2008-11  或者  2009-1,记得这是你要求的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-6 22:43 , Processed in 0.092795 second(s), 33 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表