goatsaregreat
Programmer
I need to query a DB by clicking on a calendar control. The app should query the DB to find the records with the matching dates, and send that info to a grid on a separate form. I will post my sql here for your inspection. My problem is that, although the grid has the field names correct, there is no data.
Private Sub Calendar1_Click()
Dim Sql As String
Dim rs As Recordset
Dim Conn As New Connection
Conn = (DataEnvironment1.Connection2)
Conn.Open
Sql = "Select * Into datelist From Contactlist where DTC = " & Calendar1.Value & " " & _
"order by TTC"
Conn.Execute Sql
Unload Form1
Form2.Show
End Sub
TIA
Private Sub Calendar1_Click()
Dim Sql As String
Dim rs As Recordset
Dim Conn As New Connection
Conn = (DataEnvironment1.Connection2)
Conn.Open
Sql = "Select * Into datelist From Contactlist where DTC = " & Calendar1.Value & " " & _
"order by TTC"
Conn.Execute Sql
Unload Form1
Form2.Show
End Sub
TIA