danab
Oct 6th, 1999, 09:36 AM
I am using the follo0ing code:
date_text = DateValue(print_plot_patient.txdate.Text)
sqldate = Month(date_text) & "-" & Day(date_text) & "-" & Year(date_text) ' = strmonth & "/" & strday & "/" & stryear
Set all_cephs = dig2.OpenRecordset("select * from [all ceph query] where [operator name]='" & print_plot_patient.cboperator.Text & "'", dbOpenDynaset)
all_cephs.Filter = "[date of analysis] =" & "#" & sqldate & "#"
Set rs_cephs_today = all_cephs.OpenRecordset(dbOpenDynaset)
____________________________________
the problem is I need the dates of my filter to match those of the database and the ones in the data base include time .
Is there a way to compaire only the date part of a field in a table that contains date and time to a date I have in my program?
I thaught of somthing like:
all_cephs.Filter = format("[date of analysis],"m,d,y") =" & "#" & sqldate & "#"
but it didn't take.
Is there somthing similar??
Danny Abraham.
date_text = DateValue(print_plot_patient.txdate.Text)
sqldate = Month(date_text) & "-" & Day(date_text) & "-" & Year(date_text) ' = strmonth & "/" & strday & "/" & stryear
Set all_cephs = dig2.OpenRecordset("select * from [all ceph query] where [operator name]='" & print_plot_patient.cboperator.Text & "'", dbOpenDynaset)
all_cephs.Filter = "[date of analysis] =" & "#" & sqldate & "#"
Set rs_cephs_today = all_cephs.OpenRecordset(dbOpenDynaset)
____________________________________
the problem is I need the dates of my filter to match those of the database and the ones in the data base include time .
Is there a way to compaire only the date part of a field in a table that contains date and time to a date I have in my program?
I thaught of somthing like:
all_cephs.Filter = format("[date of analysis],"m,d,y") =" & "#" & sqldate & "#"
but it didn't take.
Is there somthing similar??
Danny Abraham.