我想通过一个下拉框实现日历的 自动弹出 代码如下 去高手看看那里错了 点击的时候不弹出啊
IF Describe(GetColumnName() + '.Edit.Style') = 'ddlb' &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE1" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE2" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE3" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE4" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE5" &
then
window iw_parent
long l_x,l_y
iw_parent=this.getparent()
if isvalid(uo_comctl_month-fordw) then iw_parent.closeuserobject(uo_comctl_month-fordw)
uo_comctl_month-fordw = CREATE uo_comctl_month-fordw
uo_comctl_month-fordw.visible =False
l_X = uf_Get_X( GetColumnName(), left!, uo_comctl_month-fordw.width,iw_parent )
l_Y = uf_Get_Y( GetColumnName(), uo_comctl_month-fordw.height ,iw_parent)
nvo__month_dw lnvo_month
lnvo_month.iw_parent=iw_parent
lnvo_month.idw_datawindow=this
lnvo_month.ls_colname=GetColumnName()
choose case Upper(Describe(GetColumnName() + '.ColType'))
case "D_DATE"
lnvo_month.d_date=this.getitemdate(this.getrow(),GetcolumnName())
lnvo_month.bl_isdate=true
case "D_DATE1"
lnvo_month.d_date=this.getitemdate(this.getrow(),GetcolumnName())
lnvo_month.bl_isdate=true
case "D_DATE2"
lnvo_month.d_date=this.getitemdate(this.getrow(),GetcolumnName())
lnvo_month.bl_isdate=true
case "D_DATE3"
lnvo_month.d_date=this.getitemdate(this.getrow(),GetcolumnName())
lnvo_month.bl_isdate=true
case "D_DATE4"
lnvo_month.d_date=this.getitemdate(this.getrow(),GetcolumnName())
lnvo_month.bl_isdate=true
case "D_DATE5"
lnvo_month.d_date=this.getitemdate(this.getrow(),GetcolumnName())
lnvo_month.bl_isdate=true
end choose
iw_parent.OpenUserObjectwithparm(uo_comctl_month-fordw,lnvo_month,l_X,l_y)
if isvalid(uo_comctl_month-fordw) then
uo_comctl_month-fordw.SetPosition(ToTop!)
uo_comctl_month-fordw.visible = true
end if
return 1
end if
------解决方案--------------------
我觉得程序逻辑上有问题:
IF Describe(GetColumnName() + '.Edit.Style') = 'ddlb' &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE1" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE2" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE3" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE4" &
AND Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE5" &
then
。。。。
中的 AND 连接应该是讲不通的,应该用 OR ;
如:
IF Describe(GetColumnName() + '.Edit.Style') = 'ddlb' &
AND (Upper(Describe(GetColumnName() + '.ColType')) = "D_DATE" &