A
anil
hi all
I am using the following code(partof) to select date from the forms:
SQLStr = "Select * from tbllog where [tbllog].[Adate]=#" &
Format([Forms]!frmSamplingSchedule!SelectADate, "dd/mm/yyyy") & " # "
rst.Open SQLStr
If rst.RecordCount = 0 Then
rst.Close
MsgBox "There are No Records in the table for Date = " &
Format([Forms]!frmSamplingSchedule!SelectADate, "dd/MM/yyyy") & " "
Exit Sub
Else
MsgBox "Date " &
Format([Forms]!frmSamplingSchedule!SelectADate, "dd/mm/yyyy") & "
found"
Debug.Print rst.RecordCount
rst.MoveFirst
Now the problem is I am not able to select all dates .Although I have
to select weekending date but I am testing for all dates now.So I
tested for
21/4/2006,28/4/2006,5/5/2006,12/5/2006,19/5/2006,26/5/2006,2/6/2006,9/6/2006,16/7/2006.
when I select 12/5/2006,2/6/2006,9/6/2006,I am not getting any results
and getting recordcount =0,although there are records in the table.For
all other records I am getting results.Is there any wrong in code or I
am working wrong.Please help me It's driving me crazy.
thanks
anil
I am using the following code(partof) to select date from the forms:
SQLStr = "Select * from tbllog where [tbllog].[Adate]=#" &
Format([Forms]!frmSamplingSchedule!SelectADate, "dd/mm/yyyy") & " # "
rst.Open SQLStr
If rst.RecordCount = 0 Then
rst.Close
MsgBox "There are No Records in the table for Date = " &
Format([Forms]!frmSamplingSchedule!SelectADate, "dd/MM/yyyy") & " "
Exit Sub
Else
MsgBox "Date " &
Format([Forms]!frmSamplingSchedule!SelectADate, "dd/mm/yyyy") & "
found"
Debug.Print rst.RecordCount
rst.MoveFirst
Now the problem is I am not able to select all dates .Although I have
to select weekending date but I am testing for all dates now.So I
tested for
21/4/2006,28/4/2006,5/5/2006,12/5/2006,19/5/2006,26/5/2006,2/6/2006,9/6/2006,16/7/2006.
when I select 12/5/2006,2/6/2006,9/6/2006,I am not getting any results
and getting recordcount =0,although there are records in the table.For
all other records I am getting results.Is there any wrong in code or I
am working wrong.Please help me It's driving me crazy.
thanks
anil