1、请问在datagrid控件中如何存放DTPicker控件?使得显示出来的这一列都用DTPicker控件来表示时间。2、
Dim lngOffset As Long
Const ChunkSize As Integer = 16384
Dim DataFile As Integer, Fl As Long, Chunks As Integer
Dim Fragment As Integer, Chunk() As Byte, I As IntegerSql = "SELECT img FROM t_rsempinfo WHERE sempid = '" & txtempid.Text & "'"
rst.Open Sql, conn, 1, 3
MediaTemp = App.Path & "\mdiatemp.tmp"
DataFile = 1
Open MediaTemp For Binary Access Write As DataFile
lngTotalSize = rst("img").ActualSize
Chunks = lngTotalSize \ ChunkSize
Fragment = lngTotalSize Mod ChunkSize
'*************************************'
Chunk() = rst("img").GetChunk(lngOffset, ChunkSize)
这句话有什么错误,提示:无效的参数号或无效的属性赋值。
如果数据库时access
   chunk()=rs!img.getchunk(lngoffset,chunksize)是正确的。

解决方案 »

  1.   

    1、你可以将dtpicker的位置定到dategrid的单元格的位置
      

  2.   

    在第一列显示DTPicker:
    Private Sub DataGrid1_Click()         If DataGrid1.Col = 1 Then        DTPicker1.Visible = True
            DTPicker1.Width = DataGrid1.Columns(1).Width
            DTPicker1.Left = DataGrid1.Left + DataGrid1.Columns(1).Left
            DTPicker1.Top = DataGrid1.Top + DataGrid1.Row * (DataGrid1.RowHeight + 15) + 215
        Else
            DTPicker1.Visible = False
        End If
    End Sub