X
xiaodan86
If I have a table something like this:
startdate | stime | endate | etime | tool
3/3/07 | 8:47 | 3/4/07 | 00:30 | A
3/4/07 | 3:57 | 3/4/07 |4:30 | B
3/4/07 |8:21 | 3/4/07 |9:20 | C
Currently I have a form which use to open dailyrecord.
I have one textbox([date]) for enter date and a button to view.
Is it possible when I wan to open a new form with all the records on
3/4/07
it will only give me the records from 3/3/07 7:00 till 3/4/07 7:00
(thus, only show tool A and tool B)
my currently event procedure for the button is below:
Dim strSQL As String
Dim strWhere As String
If Not IsNull(date) Then
strWhere = strWhere & " AND startdate = " & "#" & _
date & "#"
If Not IsNull(strWhere) Then
strSQL = Mid$(strWhere, 6)
End If
strForm = "daily1"
DoCmd.openform strForm, , , strSQL
Anything can be change on the code in order to search the records base
on time interval?
Thanks =)
startdate | stime | endate | etime | tool
3/3/07 | 8:47 | 3/4/07 | 00:30 | A
3/4/07 | 3:57 | 3/4/07 |4:30 | B
3/4/07 |8:21 | 3/4/07 |9:20 | C
Currently I have a form which use to open dailyrecord.
I have one textbox([date]) for enter date and a button to view.
Is it possible when I wan to open a new form with all the records on
3/4/07
it will only give me the records from 3/3/07 7:00 till 3/4/07 7:00
(thus, only show tool A and tool B)
my currently event procedure for the button is below:
Dim strSQL As String
Dim strWhere As String
If Not IsNull(date) Then
strWhere = strWhere & " AND startdate = " & "#" & _
date & "#"
If Not IsNull(strWhere) Then
strSQL = Mid$(strWhere, 6)
End If
strForm = "daily1"
DoCmd.openform strForm, , , strSQL
Anything can be change on the code in order to search the records base
on time interval?
Thanks =)