VBA Access Where Clause with Form Date Values | بلاگ

VBA Access Where Clause with Form Date Values

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

I'm trying to write a DoCmd.RunSQL with a where clause with date values passed through from a form.

The code i've written runs with out errors but returns 0 values because of this i think its a date formatting issue...

DoCmd.RunSQL ("SELECT [Field1], [Field2] INTO [tbl_recordset] FROM qry_1" _ & " WHERE (qry_1.Survey_Dt) >= #" & Format([Forms]![frm_Parameters]![txt_StartDate], "YYYY-MM-DD") & "# ;")

qry1.Survey_Dt is passed through from the SQL server in the default format (yyyy-mm-dd format), does access reformat the data in the parent query?

I've tried reformatting the dates in the parent query and the child query but with no success any help would be greatly appreciated.

asked 59 secs ago
Nphelps

...
نویسنده : استخدام کار بازدید : 3 تاريخ : سه شنبه 9 مرداد 1397 ساعت: 4:34