紧急求助、挑选日期的问题

asonglinux 2012-11-21 02:55:10
thisform。text1.value =2012
thisform。text2.value = 11
thisform。combo1.recordsource =‘’

现在想要得结果是
在COMBO1 中显示 2012/11月 中每个星期6的日期。比如10号 或者 17号


在线等、、、、
...全文
112 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
十豆三 2012-11-21
  • 打赏
  • 举报
回复
Set Fdow To
ldDateS=Date(Thisform.Text1.Value,Thisform.Text2.Value,1)
ldDateE=Gomonth(ldDateS-Day(ldDateS)+1,1)-1
Thisform.Combo1.RowSourceType=0
For lnI=0 To Day(ldDateE)-1
	If Dow(ldDateS+lnI)=7
		Thisform.Combo1.AddItem(Dtoc(ldDateS+lnI))
	Endif
Endfor
cupoflife 2012-11-21
  • 打赏
  • 举报
回复
&&以下代码放到Text1、Text2的Valid事件中去 LOCAL nYear,nMonth,dDate m.nYear=Thisform.text1.Value m.nMonth=Thisform.text2.Value m.dDate=CTOD(STR(m.nYear,4)+"."+STR(m.nMonth,2)+".01") IF NOT EMPTY(m.dDate) Thisform.combo1.Clear DO WHILE .T. IF DOW(m.dDate,2)=6 Thisform.combo1.AddItem(STR(DAY(m.dDate))) ENDIF IF MONTH(m.dDate)=MONTH(m.dDate+1) m.dDate=m.dDate+1 ELSE EXIT ENDIF ENDDO Thisform.combo1.ListIndex =1 ENDIF

2,749

社区成员

发帖
与我相关
我的任务
社区描述
VFP,是Microsoft公司推出的数据库开发软件,用它来开发数据库,既简单又方便。
社区管理员
  • VFP社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧