我在这里需要帮助...... [英] i need help here...

查看:73
本文介绍了我在这里需要帮助......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..

我有一个名为" showreminder" 的表格。在这种形式我有2个dtpicker 1命令按钮和1个datagrid:DTPfromDt和DTPtoDt和cmdshowreminder,以及MSHFlexGrid1 ...

此表单必须连接到另一个表单,称为" ;.在这种形式我有:txtid,txtcaseid,txtreminder,cmbreminderby,txtremin dto,dtpentrydt,dtpclosedt ..


当我在我的第一个表单中选择fromdate和todate并按下commandbutton cmdshowreminder它必须连接到我的第二个表格,并且网格必须显示它们在这些选定日期之间的数据..


im尝试为其工作而写一个程序

是不是我可以在表格和代码本身中做到这一点???

请帮助我这里

谢谢

解决方案

即时通讯尝试此代码,我的网格空白了

如何将fromdt和todt从这个表单连接到另一个表单机智入口和关闭? br />


Private Sub cmdshowreminder_Click()

Dim sQuery As String

如果FieldName =" DTPfromdt" ;并且FieldName =" DTPtodt"然后

sQuery =" select id,caseid,convert(VarChar(20),reminders.reminddt,6),提醒,提醒,提醒来自提醒


Adodc1.ConnectionString = pStrConnectionString

Adodc1.RecordSource = sQuery

Adodc1.Refresh

设置frmReminders.MSHFlexGrid1.DataSource = Adodc1

设置frmReminders.MSHFlexGrid1.Recordset = Adodc1.Recordset

Adodc1.Refresh

frmReminders.MSHFlexGrid1.ColWidth(1)= 500

frmReminders.MSHFlexGrid1.ColWidth(2)= 500

frmReminders.MSHFlexGrid1.ColWidth(3)= 1000

frmReminders.MSHFlexGrid1.ColWidth(4)= 2000

frmReminders.MSHFlexGrid1.ColWidth(5)= 2000

frmReminders.MSHFlexGrid1.ColWidth(5)= 2000

frmReminders.MSHFlexGrid1.Refresh

结束如果

End Sub

您好,


在此处发布代码,如果代码有任何问题,我们可以通知您。此外,什么格式是日期显示在FlexGrid中..?


问候

Veena


[img] file:/// C :/DOCUME%7E1/AZITA%7E1.MOS/LOCALS%7E1/Temp/moz-screenshot.jpg [/ img]这是我的代码,我的日期格式是mm / dd / yyyy

my当我点击cmdshowreminder时网格是空的

如何将这两个表连接在一起并根据所选日期获取网格

谢谢你




Private Sub cmdshowreminder_Click()

Dim sQuery As String

如果FieldName =" DTPfromdt"并且FieldName =" DTPtodt"然后

sQuery =" select id,caseid,convert(VarChar(20),reminders.reminddt,6),提醒,提醒,提醒来自提醒


Adodc1.ConnectionString = pStrConnectionString

Adodc1.RecordSource = sQuery

Adodc1.Refresh

设置frmReminders.MSHFlexGrid1.DataSource = Adodc1

设置frmReminders.MSHFlexGrid1.Recordset = Adodc1.Recordset

Adodc1.Refresh

frmReminders.MSHFlexGrid1.ColWidth(1)= 500

frmReminders.MSHFlexGrid1.ColWidth(2)= 500

frmReminders.MSHFlexGrid1.ColWidth(3)= 1000

frmReminders.MSHFlexGrid1.ColWidth(4)= 2000

frmReminders.MSHFlexGrid1.ColWidth(5)= 2000

frmReminders.MSHFlexGrid1.ColWidth(5)= 2000

frmReminders.MSHFlexGrid1.Refresh


结束如果

结束UB

Hi everyone..
I have a form called "showreminder". in this form i have 2 dtpicker 1 command button and 1 datagrid : DTPfromDt and DTPtoDt and cmdshowreminder, and MSHFlexGrid1...
this form has to connect to one more form which is called as "reminders". in this form i have : txtid,txtcaseid,txtreminder,cmbreminderby,txtremin dto,dtpentrydt,dtpclosedt..

when i select the fromdate and todate in my first form and press the commandbutton cmdshowreminder it has to connect to my second form and the gird has to show the data which its there between these selected date..

i m trying to write a prcedure for tht bt its not working
is it any way tht i can do it in the form and code itself???
plz help me here
thanks

解决方案

i m trying this code bt my grid is coming empty
how to connect the fromdt and todt from this form to the other form wit entrydt and closedt?



Private Sub cmdshowreminder_Click()
Dim sQuery As String
If FieldName = "DTPfromdt" And FieldName = "DTPtodt" Then
sQuery = "select id, caseid,convert(VarChar(20), reminders.reminddt, 6), reminder, reminderby, reminderto From reminders"

Adodc1.ConnectionString = pStrConnectionString
Adodc1.RecordSource = sQuery
Adodc1.Refresh
Set frmReminders.MSHFlexGrid1.DataSource = Adodc1
Set frmReminders.MSHFlexGrid1.Recordset = Adodc1.Recordset
Adodc1.Refresh
frmReminders.MSHFlexGrid1.ColWidth(1) = 500
frmReminders.MSHFlexGrid1.ColWidth(2) = 500
frmReminders.MSHFlexGrid1.ColWidth(3) = 1000
frmReminders.MSHFlexGrid1.ColWidth(4) = 2000
frmReminders.MSHFlexGrid1.ColWidth(5) = 2000
frmReminders.MSHFlexGrid1.ColWidth(5) = 2000
frmReminders.MSHFlexGrid1.Refresh
end if
End Sub


Hi,

Post the Code here, If there is any problem with the code, we can let you know.. Also, What format is the date Displayed in the FlexGrid..?

Regards
Veena


[img]file:///C:/DOCUME%7E1/AZITA%7E1.MOS/LOCALS%7E1/Temp/moz-screenshot.jpg[/img]this is my code and my date format is mm/dd/yyyy
my grid is empty when i click on cmdshowreminder
how can i connected these 2 tables together and get the grid according to selected date
thank u



Private Sub cmdshowreminder_Click()
Dim sQuery As String
If FieldName = "DTPfromdt" And FieldName = "DTPtodt" Then
sQuery = "select id, caseid,convert(VarChar(20), reminders.reminddt, 6), reminder, reminderby, reminderto From reminders"

Adodc1.ConnectionString = pStrConnectionString
Adodc1.RecordSource = sQuery
Adodc1.Refresh
Set frmReminders.MSHFlexGrid1.DataSource = Adodc1
Set frmReminders.MSHFlexGrid1.Recordset = Adodc1.Recordset
Adodc1.Refresh
frmReminders.MSHFlexGrid1.ColWidth(1) = 500
frmReminders.MSHFlexGrid1.ColWidth(2) = 500
frmReminders.MSHFlexGrid1.ColWidth(3) = 1000
frmReminders.MSHFlexGrid1.ColWidth(4) = 2000
frmReminders.MSHFlexGrid1.ColWidth(5) = 2000
frmReminders.MSHFlexGrid1.ColWidth(5) = 2000
frmReminders.MSHFlexGrid1.Refresh

end if
end sub


这篇关于我在这里需要帮助......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆