hello,i have this code
Code:
Option Explicit

Private Sub Form_Load()

    Me.pump.AddItem "P1--01"
    Me.pump.AddItem "P3--03"
    Me.pump.AddItem "P4--04"
    Me.pump.AddItem "P5--05"
    
    Me.DataGrid.Visible = True
     
End Sub

Private Sub pump_Click()
dim dbfilename as stirng

Dim oRs As New ADODB.Recordset
Dim adoConn As ADODB.Connection
Set adoConn = New ADODB.Connection

 Do
    
        createDummyBase Me.DTP1_date.value, Me.DTP1_hour.value, Me.DTP2_date.value, Me.DTP2_hour.value, 20, pump.Text
        dbFilename = "Report_" & Format(Now, "MM_YY") & ".mdb"
        adoConn.ConnectionString = BuildConnectionString(dbFilename)
        adoConn.Open
        oRs.Open "select * from Report", adoConn, adUseClient, adLockOptimistic
        Set DataGrid.DataSource = oRs
        DataGrid.AllowAddNew = True
        DataGrid.Visible = True
        DataGrid.Refresh
        Debug.Print oRs.RecordCount

End Sub
in the form load i have one combobox called pump which have four values(P1,P3,P4,P5) and four datepickers , two for selecting the date and two for selecting the hour , called: DTP1_date,DTP1_hour,DTP2_date,DTP2_hour .
i want when i choose the DTP1_date,DTP1_hour,DTP2_date,DTP2_hour in the form load to pass their values in the createDummyBase sub(not manully with code).
the .value property of dtpicker doesnot exist.any ideas ?please help.thx