I get a syntax error what am i missing
table is contactmanager
field to count is apptdates
Private Sub apptcheck2()
Dim db As Database
Dim rs As Recordset
Dim sqlstring As String
Set db =OpenDatabase("c:\data\op\pos405\contact2\contactmanager.mdb"
searchfor = InputBox("Enter appt date"
sqlstring = "Select contactmanager.apptdate, count(contactmanager.apptdate)As
NoOfOrders from contactmanager and having ((contactmanager.apptdate) = #" & searchfor & "#"
Set rs = db.OpenRecordset(sqlstring)
picResults.Print rs.Fields(" noOfdates "
End Sub
table is contactmanager
field to count is apptdates
Private Sub apptcheck2()
Dim db As Database
Dim rs As Recordset
Dim sqlstring As String
Set db =OpenDatabase("c:\data\op\pos405\contact2\contactmanager.mdb"
searchfor = InputBox("Enter appt date"
sqlstring = "Select contactmanager.apptdate, count(contactmanager.apptdate)As
NoOfOrders from contactmanager and having ((contactmanager.apptdate) = #" & searchfor & "#"
Set rs = db.OpenRecordset(sqlstring)
picResults.Print rs.Fields(" noOfdates "
End Sub